Create Out-Of-Process COM in C#/.Net?

前端 未结 9 834
无人共我
无人共我 2020-11-29 02:23

I need to create an out-of-process COM server (.exe) in C# that will be accessed by multiple other processes on the same box. The component has to be a single process becaus

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 02:30

    IMO, one of the ways through which this can be done is to create a normal COM Dll as per the method you mentioned in the link and then after registering your COM dll, change it to a surrogate DLL. This can be done very easily through OLEView utility, although you can do it manually as well by changing registry entries as well through the method mentioned at http://msdn.microsoft.com/en-us/library/ms686606(VS.85).aspx.

    By making this a surrogate DLL, it will run in it's own dllhost.exe and hence will be out-of-process.

提交回复
热议问题