I have a QWIN program that uses a DLL which sends status and progress events.
The events are registered using RegisterWindowsMessage.
In order to react to these messages I have set up a hook like this:
use ifwin, only: SetWindowsHookEx, GetCurrentThreadId, WH_GETMESSAGE ! ... m_hHook = SetWindowsHookEx(WH_GETMESSAGE, %LOC(V3MessagesHook), 0, GetCurrentThreadId())
The signature of the V3MessagesHook function is like this:
integer(4) function V3MessagesHook(nCode, wparam, lparam) !DEC$ ATTRIBUTES STDCALL, DECORATE :: V3MessagesHook integer(4), intent(in) :: nCode, wParam, lParam !... end function
Compiling and running the program is no problem, the results are ok, too. But the V3MessagesHook function gets never called.
Using Spy++ I can see that the events I'm trying to get are fired alright.
Where am I going wrong?
TIA Felix