Reputation: 61
I have a DLL containing a COM object that I'm trying to use. I couldn't find any good explanations of how to do so with C. It would be much appreciated if you guys could redirect me to a tutorial or something.
Upvotes: 1
Views: 220
Reputation: 942187
Writing C code that uses a COM server is outlawed by the 'cruel and unusual punishment' clause in Article 5 of the Universal Declaration of Human Rights.
Should you elect to ignore this then try to get started by running OleView.exe, File + View TypeLib, select the DLL. That opens a window with the contents of the type library embedded in the DLL. Copy and paste the interface declarations into a .idl file. Run this through midl.exe, that produces a .h file that has C compatible declarations for the interfaces.
Upvotes: 1
Reputation: 1903
Code project has a lot of samples. A quick search gave me this article on COM in C.
Upvotes: 1