0

I have an application that launches the Problem Steps Recorder utility that ships with Windows 7 and later that records all user mouse and keyboard interactions. It does so by creating a new Process instance and launching the PSR with a number of command line parameters, including one that suppresses the GUI.

My app needs to wait until the utility has set the mouse hook before proceeding. I'm able to wait until I'm certain the process has started successfully, but the utility does not expose any sort of event for when it has started recording. With no GUI, Process.WaitForInputIdle() can't tell me when I'm ready to proceed either.

Is there a way to detect when a new low level mouse hook has been set by a third party application?

HotN
  • 4,216
  • 3
  • 40
  • 51
  • That's not possible, that hook doesn't hook you. You'll need to describe what "proceeding" actually does. When Process.WaitForInputIdle() returns you should be good to go. – Hans Passant Apr 01 '15 at 15:28
  • I should have clarified a bit. I'm launching the Problem Steps Recorder without a GUI via command line parameter. From what I've read on Process.WaitForInputIdle() only works for processes with a GUI. I'll update my question. – HotN Apr 01 '15 at 16:01
  • As for "proceeding", I intend to disable my app's UI until I'm certain the PSR is recording mouse clicks so no user clicks are missed. I know how to do this with my own hook, but my client insists on using PSR output due to the fine details it produces of what a user has clicked, even within unmanaged applications. – HotN Apr 01 '15 at 16:02
  • You can't be certain. Stop faking it, there isn't any point in hiding PSR when the user likes it so much. – Hans Passant Apr 01 '15 at 16:10
  • I can accept being unable to be certain as an answer (sadly), but my client is not the user. The user is a student taking an exam with a restricted interface (taskbar suppression, for instance) and the intention is to use PSR to show what a user has done when they claim they did something right but didn't get the points. Showing the user the GUI will allow them to stop the recording. I was hoping there was a way to get access to the mouse hook callback chain, but if I can't, I can't. – HotN Apr 01 '15 at 16:16

0 Answers0