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.