Solved

Windows API Hook Notification when Capturing Display

Posted on 2009-05-09
5
500 Views
Last Modified: 2013-12-03
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?
0
Comment
Question by:secondeff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 24348274
Take a look at http://www.codeproject.com/KB/system/hooksys.aspx ("API hooking revealed") - this article explains that in detail and comes with full source code.
0
 
LVL 1

Author Comment

by:secondeff
ID: 24378119
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?
0
 
LVL 86

Expert Comment

by:jkr
ID: 24378229
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...
0
 
LVL 1

Author Comment

by:secondeff
ID: 24378284
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.
0
 
LVL 86

Expert Comment

by:jkr
ID: 24378791
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.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question