Detect ScreenShot

Everything else that doesn't fall into one of the other PB categories.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Detect ScreenShot

Post by Kwai chang caine »

I was afraid of your answer :(

I have dreaming that perhaps, the screenshot call always the same function for do his job :roll:
But, when i read your answer at all, i see it's not the case.

I have reflected, yes yes....Kcc reflected also...not really results go out...but much more reflexion :mrgreen:

Like, there are not technical method to intercept a screenshot, there is a very not perfect solution..... :roll:
It's to take inventory of all the software, who can make screenshot..and if one of the process are in the list, detect it...

It's really a Kcc method... :oops: :oops:
ImageThe happiness is a road...
Not a destination
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Detect ScreenShot

Post by idle »

It may be possible to detect a screen shot though it wouldn't be very system friendly as you'd have to use system wide api hooks to DC, memory and bitmap functions but even then you couldn't be certain if the app was taking a screen shot.

monitor memory allocations for the screen resolution * depth and score a flag
monitor bitmap creation functions and flag those that match the screen width and height
monitor calls to GetDC(0)
monitor calls to Selectobject(hdc,hgdiobj)
monitor calls to blit function where the srcDC is the hdc of the desktop
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Detect ScreenShot

Post by Vera »

Hi Kwaï chang caïne,

you made me start to speculate about it as well Image

Life monitoring the whole memory and all ongoing processes can't be a way*, but I suppose that the actual desktop is memorised in a certain space. If a screenshot is taken this special memory area is demanded. So I resume to monitor, if a demand to this section occurs.

Sorry, if this is rubbish, but that's the direction my thoughts go to.

good luck ~ Vera

* this is no refering to what idle wrote - he might be right - i can't review at all ;)

edit: reinstalled : roll : icon to correct the deranged meaning by forum supporter
Last edited by Vera on Sat Oct 30, 2010 7:22 pm, edited 1 time in total.
Mr Coder
User
User
Posts: 54
Joined: Tue Apr 13, 2010 8:02 am

Re: Detect ScreenShot

Post by Mr Coder »

SFSxOI wrote:Perhaps I missed something, but he doesn't want to take a screen shot, he wants to detect when another appliction takes a screen shot.
You did miss something. :) I know that's what he wants to do. My comment was to show that checking for screenshots, that were taken by other apps, by looking at the clipboard content, is not going to work; because some apps will use code that doesn't use the clipboard to take shots, as found numerous times in these forums. ;)

Now, in another thread here there is an app called GreenForce Player, which prides itself on stopping people taking screenshots of a "protected" video that it plays. And I showed how it can be overcome with either code from these forums using BitBlt, or a simple freeware app (http://www.fraps.com). Basically, you can't detect when another app takes a screenshot, so it's best to give up trying. It's called flogging a dead horse.

(And even if there was a way to detect it, how is an app going to stop a screenshot being taken in a virtual environment, such as VirtualBox?).
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Detect ScreenShot

Post by Kwai chang caine »

Thanks at all, for your numerous tips. 8)

It's really a difficult mission, like usually for KCC
But now thanks to you, when i begin to search the solution...i have the goods way for search

I wish at you all, a very good day 8)
ImageThe happiness is a road...
Not a destination
Post Reply