Here's the code I typed into a Win32 Application (not console):
Code:
HANDLE myLib = LoadLibrary("tokenizer.dll");
CompileProc Compile;
VerifyProc TestRecAlignment;
VersionProc Version;
TModuleRec tModRec;
Compile = (CompileProc)GetProcAddress(myLib, "Compile");
Version = (VersionProc)GetProcAddress(myLib, "Version");
TestRecAlignment = (VerifyProc)GetProcAddress(myLib, "TestRecAlignment");
And here's the errors I get:
Code:
C:\Program Files\Microsoft Visual Studio\MyProjects\RoboCode\RoboCode.cpp(14) : error C2664: 'GetProcAddress' : cannot convert parameter 1 from 'void *' to 'struct HINSTANCE__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\Program Files\Microsoft Visual Studio\MyProjects\RoboCode\RoboCode.cpp(15) : error C2664: 'GetProcAddress' : cannot convert parameter 1 from 'void *' to 'struct HINSTANCE__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\Program Files\Microsoft Visual Studio\MyProjects\RoboCode\RoboCode.cpp(16) : error C2664: 'GetProcAddress' : cannot convert parameter 1 from 'void *' to 'struct HINSTANCE__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
The code compiled perfect when I did it in a console program, and all I did was copy/paste it (the code is in the "WinMain" thing). I've tried to fix it, but no luck, and I've looked up the errors on MSDN, but it didn't help me at all. Can someone help me please? The tokenizer.dll is in the folder where it's supposed to be (it loads correctly). I'm using MSVC++ 6.0 incase that helps at all.