Post by Miguel7 » 23 Nov 2014, 01:15
Hi guys,
I've been trying to use some non-standard DLLs in my scripts via DllCall, but I've found there are way too many factors that can throw things off. Part of this has been due to differences between AHK and C++ (or whatever other language the DLLs are written in); for example, in many cases I would get an ErrorLevel of A8 (a difference in the number of bits in the variable being passed as a parameter). Other examples of this are when the DLL takes an object, or an int that's part of an enumeration (and I don't have the actual values of the enum), or some other type that doesn't exist in AHK.
But then I found out one of these DLLs had a COM interface. Next thing I knew, I had created an AHK class that used every single function of the DLL. So it got me thinking, what exactly is needed to create a COM object? From what I've read, the goal of COM was to be language-independent (which is probably why it's so easy to use in AHK, lol), but what language(s) are they written in? What are the requirements for an object to be a COM object? I've tried to google this, but because every other site on earth ends in ".com" it returned a lot of unrelated stuff. So if any of you have done it before, I'd sure like to know.
Hi guys,
I've been trying to use some non-standard DLLs in my scripts via DllCall, but I've found there are way too many factors that can throw things off. Part of this has been due to differences between AHK and C++ (or whatever other language the DLLs are written in); for example, in many cases I would get an ErrorLevel of A8 (a difference in the number of bits in the variable being passed as a parameter). Other examples of this are when the DLL takes an object, or an int that's part of an enumeration (and I don't have the actual values of the enum), or some other type that doesn't exist in AHK.
But then I found out one of these DLLs had a COM interface. Next thing I knew, I had created an AHK class that used every single function of the DLL. So it got me thinking, what exactly is needed to create a COM object? From what I've read, the goal of COM was to be language-independent (which is probably why it's so easy to use in AHK, lol), but what language(s) are they written in? What are the requirements for an object to be a COM object? I've tried to google this, but because every other site on earth ends in ".com" it returned a lot of unrelated stuff. So if any of you have done it before, I'd sure like to know. :)