我已经通过 COM 运行了可用的服务。我可以使用 Activator
与其连接。
我连接COM库
using MyLib;
然后通过实例获取我的对象
Activator.CreateInstance((Type.GetTypeFromProgID("RunningInstance")));
这实际上是IConnectionPointContainer
有多个连接点,要获得一个连接点
FindConnectionPoint(SomeGuidHere, out MyConnectionPoint);
如果我没记错的话,在 cpp atl 中只有 __uuid(IHelloWorld)
问题是:如何获取Container中某个“IHelloWorld”接口(interface)(连接点)的引导?
最佳答案
按照 this answer 中所述使用 EnumConnectionPoints()
.
关于c# - 如何从未知的 com 对象接口(interface)(例如连接点)获取 guid?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14682892/