且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

IDispatch接口调用COM接口从C#成员

更新时间:2023-02-09 14:58:25

没有你不能,因为InvokeMember内部使用的GetIDsOfNames,而这一次只检查实际的方法,而不是在IDispatch的第6。或者,换句话说,GetIDsOfNames将不能使用的IDispatch的方法Invoke调用。这就是COM是如何工作的。

No you cannot, because InvokeMember internally uses GetIDsOfNames, and this one only checks actual methods, not the first 6 in IDispatch. Or in other words, GetIDsOfNames cannot be invoked using IDispatch's method Invoke. That is how COM works.