在不同的用户帐户之间使用COM [英] Using COM between different user accounts
本文介绍了在不同的用户帐户之间使用COM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要执行以下操作:
- 应用 AppA由用户 UserA运行
- 现在AppA使用runas命令启动AppB(以UserB身份启动)
现在是否可以让AppA通过COM控制AppB?尽管在没有不同用户帐户的情况下一切正常,但在上述情况下我似乎无法获得COM对象。
Is it now possible to let AppA control AppB via COM? While everything works fine without the different user accounts, I can't seem to get the COM object in the case mentioned above.
顺便说一句:我使用Runtime.InteropServices .Marshal.GetActiveObject来获取AppB的COM对象。
By the way: I use Runtime.InteropServices.Marshal.GetActiveObject to get the COM object of AppB.
有什么想法吗?
谢谢!
Any ideas? Thanks!
推荐答案
我认为您需要在被调用的COM对象上设置DCOM安全性。这里有一个示例:
I think you need to set the DCOM Security on the called COM Object. There is an example here:
- 给出ProgId
- 在组件服务中找到DCOM配置并进入属性
- 找到安全性选项卡并设置启动和激活权限,并授予调用者执行此操作的权限。
这篇关于在不同的用户帐户之间使用COM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文