Reputation: 33754
I've got running service which is available via COM. I can connect with it by using Activator
.
I connect COM library
using MyLib;
and then get my object by Instance
Activator.CreateInstance((Type.GetTypeFromProgID("RunningInstance")));
this is actually IConnectionPointContainer
there are several connection points and to get one there is
FindConnectionPoint(SomeGuidHere, out MyConnectionPoint);
if I remember correctly in cpp atl there is just __uuid(IHelloWorld)
the problem is: how to get guide of some "IHelloWorld" interface (connection point) in the Container ?
Upvotes: 2
Views: 1985
Reputation: 233
If you have a reference to the interface, you can get the GUID from the type.
typeof(IHelloWorld).GUID
Upvotes: 0