I searched the board and also read the DLL tutorial, but am still unclear as to the "how to" of DLL's and function parameters.
How to call/invoke dll functions with params is still a mystery to me. Any info would be appreciated.


Posted on 2001-11-13 00:58:10 by Masm64
In MASM you have 2 methods, prototype a function call in a DLL and have the library for it which you include, OR, LoadLibrary() GetProcAddress() and call the address after you have pushed the parameters.

ALL API calls are DLL calls so its no big deal. Include the include file that has the prototypes and the import library that has the definition of the called function then use "invoke" like any other API call.

Manually means pushing the parameters in reverse order if it is a STDCALL function like almost all API calls are, then call the address returned from GetProcAddress.


Posted on 2001-11-13 03:17:59 by hutch--
O ... ok, got it *-).


Posted on 2001-11-13 05:06:20 by Masm64
You can also use invoke with GetProcAddress imported functions.
You do have to set up a prototype, and it looks a bit different from
"regular" invoking... let me see if I can find an example. Yup, there
it was:

INVOKE (TYPE MessageBox) PTR eax, NULL, ADDR text, ADDR caption, MB_OK
Posted on 2001-11-13 08:02:10 by f0dder