Can anyone explain the difference between the AX DLLs that you might create in VB vs. the DLL libraries that you reference in API calls with Declare Function?
Printable View
Can anyone explain the difference between the AX DLLs that you might create in VB vs. the DLL libraries that you reference in API calls with Declare Function?
The difference -
Regular dll's expose functions like CreateProcessA. These are the kind of dll's made with C++.
ActiveX dll's expose a COM interface. They do not expose functions. The interfaces exposed are prescribed, and are fixed in stone. Any client that wants to use this dll already knows the interfaces. Before it ever asks to use it. And part of the knowledge of how to use it is under the control of the Server Control Manager (SCM) - a block of code that is part of windows.
An interface is a predictable binary format for function pointers, that has smarts built into it. These smarts work the same whether you call the interface from VB, java , or C++.
Either type of dll has what is called a COFF format (as do .EXE files and .OBJ files), but the way the two types talk with the world is completely different.
Thanks, Jim.