0 Replies Latest reply: Aug 3, 2011 8:20 AM by 805044 RSS

    how to SetWindowsHookEx  with Java native access (JNA)

    805044
      Hey guys,

      How can i set up windows hook with WH_FOREGROUNDIDLE and the following call back Functions

      DWORD CALLBACK ForegroundIdleProc( __in int code, DWORD wParam, LONG lParam );

      I am trying to detect when a thread/process goes idle
      i have obtained the threadProccessId by using the following functions

      GetForegroundWindow -> GetWindowThreadProcessId.

      Cheers