0

I noticed that my mousehook code fails to work when interacting with EA's Origin store. Basically when clicking inside of the window, it does not call the callback I registered with windows (using the SetWindowsHookEx function). I tried with Steam and there are no problems there.

I am pretty certain that this is a part of some mechanism meant to prevent rogue malware from taking control of your computer to access account information. I'm curious as to how it is done. My guess is that I'll need to set up some driver magic to circumvent this from a layer closer to the hardware?

Disclaimer: I am of course not attempting to create any malicious software, I am just building powerful tools for the purposes of software automation. Obviously, with great power comes great responsibility.

Steven Lu
  • 41,389
  • 58
  • 210
  • 364

1 Answers1

0

It's possible that they have their own hook that deliberately doesn't call CallNextHookEx for events within their window.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • Does this mean that if I start my program before I run Origin, that my program will be earlier in the queue and therefore get a chance to process it first? – Steven Lu Sep 12 '11 at 18:25
  • It did work! Though I happened to have regedit open while I did it, and it seems like regedit is able to prevent my hook from capturing clicks even if I start my program before I run regedit. Interesting! This is really cool. I then went on to start my program from an elevated command prompt. Clicking around in regedit works fine that way. – Steven Lu Sep 12 '11 at 18:37
  • Which seems to indicate that there is some security stuff going on under there. It's pretty reasonable that my program shouldnt get information when the user is interacting with the registry editor. – Steven Lu Sep 12 '11 at 18:46
  • It sounds like you're seeing UIPI. – SLaks Sep 12 '11 at 19:02
  • @Steven: Is it running as administrator? – SLaks Sep 12 '11 at 20:29