Quantcast
Channel: Intel® Fortran Composer XE
Viewing all articles
Browse latest Browse all 1424

Hook not executed

$
0
0

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


Viewing all articles
Browse latest Browse all 1424

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>