|
-
June 5th, 2009, 05:27 AM
#1
Error 127 on a getProcAddress call
Hello,
I´m developing an application to hook mouse click using Visual Studio 2005. I´ve created a DLL called bloq_mouse.dll. To create this DLL I wrote an bloq_mouse.h defining the functions to be exportable:
#define DLLEXPORT __declspec(dllexport)
std::vector< std: air< POINT , POINT > > coords;
DLLEXPORT int loadBloqCoords(const char config[_MAX_PATH]);
DLLEXPORT LRESULT CALLBACK mouseHookProc(int nCode, WPARAM wParam, LPARAM lParam);
I also created an .def file :
LIBRARY bloq_mouse
EXPORTS
loadBloqCoords
mouseHookProc
And then, in a separate project, I´ve created an executable with this code:
hinstDLL = LoadLibraryA("bloq_mouse.dll");
if( hinstDLL == NULL )
{
//send error message
}
FARPROC lpfnGetProcess = GetProcAddress(hinstDLL, "loadBloqCoords");
if(lpfnGetProcess == NULL )
{
//send error message
}
The DLL seems to load succesfully (I copied it in the executable´s project dir) but when I try to access loadBloqCoords function I get an 127 error (cannot find the proccess).
I´m new with DLL making and accessing, Can Anyone Help Me?
Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|