View Single Post
  #1   Spotlight this post!  
Unread 07-01-2003, 18:30
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Tokenizer Whitepaper Help

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.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"