Alex wrote:
It seems that I will have to wait until I code enough of a test case for a *successful* ITypeInfo::Invoke() (there are two tests of failing calls, but none of a successful one)
I'm a complete COM newbie, but I've been reading "The Essence of COM" lately for entertainment; it almost describes that call. (FWIW, the example code for the book is at http://www.rollthunder.com/Books/OldBooksFrame.htm.)
I went poking around online looking for examples of that call in C, and only found two :-( http://viewcvs.php.net/viewcvs.cgi/php-src/ext/com_dotnet/com_com.c http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ercp/org.eclipse.ercp.s...
I also found a muddled discussion here: http://www.codeproject.com/atl/multidisp.asp
Good luck writing that test case! - Dan
-- Wine for Windows ISVs: http://kegel.com/wine/isv
On 3/19/06, Dan Kegel dank@kegel.com wrote:
Alex wrote:
It seems that I will have to wait until I code enough of a test case for a *successful* ITypeInfo::Invoke()
A few more vaguely relevant notes: http://codeguru.earthweb.com/Cpp/COM-Tech/atl/article.php/c3565/ briefly mentions how ATL uses ITypeInfo::Invoke(). http://www.opengroup.org/onlinepubs/009899899/CHP18GDC.HTM is the Open Group's documentation for ActiveX (!) which also covers this a bit. And, more usefully, http://groups.google.com/group/comp.os.ms-windows.programmer.ole/msg/c1417ff... says: 0) Call CoCreateInstance() to get a pointer to the object 1) Create a ITypeLib interface (via the 'LoadTypeLib' API function). 2) Call ITypeLib::GetTypeInfo to obtain ITypeInfo interface. 3) Call ITypeInfo::Invoke (almost like IDispatch::Invoke) which is exactly what I was starting to gather by reading the Automation and Type Libraries chapters of "Essence of COM". - Dan
Dan Kegel wrote:
On 3/19/06, Dan Kegel dank@kegel.com wrote:
Alex wrote:
It seems that I will have to wait until I code enough of a test case for a *successful* ITypeInfo::Invoke()
A few more vaguely relevant notes: http://codeguru.earthweb.com/Cpp/COM-Tech/atl/article.php/c3565/ briefly mentions how ATL uses ITypeInfo::Invoke(). http://www.opengroup.org/onlinepubs/009899899/CHP18GDC.HTM is the Open Group's documentation for ActiveX (!) which also covers this a bit. And, more usefully, http://groups.google.com/group/comp.os.ms-windows.programmer.ole/msg/c1417ff... says: 0) Call CoCreateInstance() to get a pointer to the object
- Create a ITypeLib interface (via the 'LoadTypeLib' API function).
- Call ITypeLib::GetTypeInfo to obtain ITypeInfo interface.
- Call ITypeInfo::Invoke (almost like IDispatch::Invoke)
which is exactly what I was starting to gather by reading the Automation and Type Libraries chapters of "Essence of COM".
I appreciate the effort, but none of those sources provide any more information than that present on MSDN, and even MSDN is woefully inadequate on the behaviour of the function in less common cases. Attached is a test case that covers a bit of the functionality in ITypeInfo::Invoke.