Hii, I am a beginner in Windows and Dotnet development and I am trying to integrate an IM client application with Office 2019.
I have made a COM server using .NET6.0
framework. I followed this documentation and the given sample as a reference to create and expose the COM server. I can see in the Registry that the class which has the attribute [ComVisible(true)]
is registered. There are two entries in the registry:
1) Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ClassLibrary1.MyIMClient : which has the subkey "CLSID" and the corresponding class ID as its value.
2) Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{6E5C29C0-1196-4D6D-BC8E-BDA1604A4BF3} : which has the default value "CoreCLR COMHost Server" and two subkeys -
-
InProcServer32
: which contains the path of the .comhost.dll
file
-
ProgID
: which contains the name of the class ClassLibrary1.MyIMClient
According to the official documentation, to discover the IM client application, Office looks for specific keys and entries in the Registry one of which is the ProcessName
and if I see the existing keys which are being used for "Lync", they also contain ProcessId
.
But my COM server is not running as a process, it is just a DLL file that was built from Visual Studio. So I read about this doc and followed the steps to use an "AppID" for the class. For now, I have taken the same AppID as the CLSID and I've left the DllSurrogate
value as empty to use the system supplied surrogate. After all this, the COM server DLL is not running as a surrogate process. Can anyone please help me figure this out?
Thanks!
Manoj