I've managed to get input hooks working, but now I'm kinda lost with putting them into a library.
I have a simple header with INPUTHOOK_EXPORTS
defined in the IDE, so the dll exports (Visual Studio).
#pragma once
#ifdef INPUTHOOK_EXPORTS
#define INPUTHOOK_API __declspec(dllexport)
#else
#define INPUTHOOK_API __declspec(dllimport)
#endif
INPUTHOOK_API void InstallInputHook();
INPUTHOOK_API void RemoveInputHook();
and of course:
The thing is, when I try to compile this library, I get two unresolved externals, one for SetWindowsHookEx
and for UnhookWindowsHookEx
respectively. Why these two functions are not available, while others are and without any problem? As far as I see, I do have the includes right.
Thank you