I have written C++ dll. In this DLL I'm hooking two WIN API, GetClipboardData & SetClipboardData. So I want to check whether the data which is going to be inserted into clipboard in SetClipboardData is from PrintScreen ?
In SetClipboardData WIN API, how I can find if data is coming from PrintScreen ?
-Thanks Ajit
You can't really know for sure. But if the clipboard contains BITMAP and DIB, does NOT contain TEXT, and..... a call to GetClipboardOwner returns NULL, then it's a pretty good bet. Hooking the PrintScreen key can be helpful, but I would only use it for correlation. i.e. note the timestamp of when PrintScreen was pressed, note the timestamp of the clipboard event, and if they are close, it's likely that the Bitmap on the clipboard, with NULL owner, was produced by the PrintScreen key.