Hi.

I've been trying to load a function from a dll, what I did was this:

Code:
typedef LRESULT (CALLBACK *pfKeyProc)(int code, WPARAM wParam, LPARAM lParam);
HINSTANCE dll = LoadLibrary(someLib.dll);
pfKeyProc pfKey;
pfKey = (pfKeyProc)GetProcAddress((HMODULE)(dll), "KeyboardProc");
And the definition in the .dll looked like this :
Code:
extern "C" __declspec(dllexport) LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam);
It didn't load correctly, but if I removed CALLBACK from the definition in the .dll it did. Should I define my typedef in some other way or could I just omit 'CALLBACK' from the defintion ?
(Or am I doing it all wrong ?)