我有通过COM提供的运行服务。我可以使用Activator
连接它。
我连接COM库
using MyLib;
然后通过Instance获取我的对象
Activator.CreateInstance((Type.GetTypeFromProgID("RunningInstance")));
这实际上是IConnectionPointContainer
有几个连接点,并且有一个连接点
FindConnectionPoint(SomeGuidHere, out MyConnectionPoint);
如果我在cpp atl中记得正确的话只有__uuid(IHelloWorld)
问题是:如何在Container中获得一些“IHelloWorld”界面(连接点)的指南?
答案 0 :(得分:2)
EnumConnectionPoints()
答案 1 :(得分:0)
如果您有对该接口的引用,则可以从该类型获取GUID。
typeof(IHelloWorld).GUID