Using COM between different user accounts

試著忘記壹切 提交于 2020-01-05 12:26:30

问题


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 fine 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!


回答1:


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.


来源:https://stackoverflow.com/questions/7021469/using-com-between-different-user-accounts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!