ComObjCreate equivalent in C++?

Discuss other programming languages besides AutoHotkey
Posts: 172
Joined: 08 Sep 2014, 07:06

ComObjCreate equivalent in C++?

13 Jul 2017, 13:16

Hey guys,

So after hours of research and seemingly endless trial'n'error, I can get CoCreateInstance to work (theoretically - that is, it passes a check using the "FAILED" Win32 function)). Now I'm getting even further into the seedy underbelly of Microsoft's COM interop API, and I can't help but wonder how the AHK team did it. Somehow they managed to turn an insane list of CLSIDs, IIDs, DISPIDs and other crap to a magical one-line function. Then you can call that COM object's methods as if it was an AHK class you created yourself. Has anyone ever seen / written something similar for C++? It seems to me that since Microsoft's original implementation is such a freaking nightmare, someone somewhere must have. If not, has anyone found a really good tutorial that explains how to correctly use COM objects after CoCreateInstance? I've been all over MSDN and found lots of function signatures but few if any tutorials (which is why it took 10 times the effort just to get CoCreateInstance working... I think). Thanks in advance. :)
User avatar
Posts: 1496
Joined: 19 Dec 2016, 01:58
Location: UK

Re: ComObjCreate equivalent in C++?

13 Jul 2017, 19:50

I don't have much to say on this, just that COM.ahk might be useful for understanding how it works. Best of luck.
COM.ahk, best version? - AutoHotkey Community

Another thing I've been told is that for an IDispatch interface, its methods can be used nicely, with an AHK object, with dot notation. But that for an IUnknown interface, you have to the ugly route and use DllCall abd NumGet.
Explorer column interaction (get/set: which appear, width, ascending/descending order) - AutoHotkey Community

Return to “Other Programming Languages”

Who is online

Users browsing this forum: No registered users and 3 guests