Link to home
Start Free TrialLog in
Avatar of secondeff
secondeffFlag for United States of America

asked on

Windows API Hook Notification when Capturing Display

I am writing a program that writes pixels to the main display background on windows. I can write the pixels, but I also need to know when this information is captured. I have a low level keyboard hook that is triggered when the print key is pressed. Is there any api hook or other way to be notified when any program calls CreateDC("DISPLAY", "", "", "") to get the main display window?
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of secondeff

ASKER

Thanks for the very informative article. However, I did not find anything specific about detecting screen capture type events. Like I said, I can only detect the print screen button. Any suggestions?
Well, you'd have to detect calls that are typical for screen capture, e.g. as you already mentioned 'CreateDC()'. The problem is now is that these might not necessarily mean screen capturing in each case...
Do you know which hook type I would use to capture a CreateDC() call? I see the issue of seperating them, but it would be a good start.
Well, as described in the article, an API hook - unfortunately, the kind of hooks set by 'SetWindowsHookEx()' can't do that, that's where API hooking comes into play.