The documentation doesn't seem to match what the compiler accepts.
LoadLibary is supposed to return a handle to the DLL, but it won't compile
if I assign the result. It's acting like it void.
tia,
--
Paul MacFarlane
http://www.business-plaza.com
http://www.sb.net/amerisft/
Here a small example, hope it helps.
HINSTANCE hinstLib;
typedef int (CALLBACK* LPFNDLLFUNC)(char*);
hinstLib = LoadLibrary("MYDLL.DLL");
if (hinstLib != NULL)
{
LPFNDLLFUNC pFuncAddress = (LPFNDLLFUNC)GetProcAddress(hinstLib,
"FUNCTIONNAME");
pFuncAddress();
FreeLibrary(hinstLib);
}
return 1;
--
Kyui Oh
Software Analyst
Promis Systems Corporation
Toronto, Ontario
Canada