I have the following line of code:
CurrentHook:=setwindowshookex(WH_KEYBOARD,@KeyBoardHook,0,GetCurrentThreadID());
where @KeyBoardHook is a function defined in the same unit.
When compiling I get the error:
Local.pas(27,60) Error: Incompatible type for arg no. 2: Got "<address of function(LongInt,Word,LongWord):DWord;StdCall>", expected "<procedure variable type of function(LongInt,LongInt,LongInt):LongInt;StdCall>"
As far as I can gather from MSDN, the second parameter of setwindowshookex should indeed be a pointer to a function with the arguments as specified.
Any ideas?
Thanks!