Post by Miguel7 » 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.
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. :)