This discussion is archived
0 Replies Latest reply: Aug 3, 2011 6:20 AM by 805044 RSS

how to SetWindowsHookEx  with Java native access (JNA)

805044 Newbie
Currently Being Moderated
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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points