开发者

Using COM between different user accounts

开发者 https://www.devze.com 2023-03-27 20:55 出处:网络
I need to do the following: Application \"AppA\" is run by user \"UserA\" Now AppA starts AppB using the runas-command (it is started as UserB)

I need to do the following:

  • Application "AppA" is run by user "UserA"
  • Now AppA starts AppB using the runas-command (it is started as UserB)

Is it now possible to let AppA control AppB via COM? While everything works f开发者_如何学JAVAine without the different user accounts, I can't seem to get the COM object in the case mentioned above.

By the way: I use Runtime.InteropServices.Marshal.GetActiveObject to get the COM object of AppB.

Any ideas? Thanks!


I think you need to set the DCOM Security on the called COM Object. There is an example here:

  1. Given the ProgId
  2. Find the DCOM Configuration in Component Services and get to the properties
  3. Find the Security Tab and set the Launch and Activation Permissions, and give the caller the rights to do this.
0

精彩评论

暂无评论...
验证码 换一张
取 消