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:
- Given the ProgId
- Find the DCOM Configuration in Component Services and get to the properties
- Find the Security Tab and set the Launch and Activation Permissions, and give the caller the rights to do this.
精彩评论