Hi i need a "brain-storm" session on this ideea: How can a program prevent the user or another program from makeing a copy of its GDI Client Area that is supposed to have "eyes only" information Any ideeas are welcome ;) like kill PrintScren Key, Stop capture programs on hot keys, stop capture programs on timmer events or precision timmers, stop remote progams from getting the screen etc.. What is required? how can be done? ;) Thx
Posted on 2001-06-13 18:33:00 by BogdanOntanu
Yeah stopping Print Screen key its one way of doing it ... but there are a lot of programs out there that do "screen capture" based on diffrent methods, like another key (cant know them all can I ?), or on a timmer...etc i belive any program can get a DC with a window handle set to NULL and so get the DC of the whole screen...then all it has to do is crop and save the image ;(
Posted on 2001-06-13 21:07:00 by BogdanOntanu
Bogdan, are you by any chance working for www.nud.ro?
Posted on 2001-06-13 21:23:00 by Larry Hammick
Might be able to do it with DirectX? ...but that's not what you wanted?
Posted on 2001-06-13 23:46:00 by bitRAKE
windows media player is able to - if you make a screenshot of a running video, you get a black whole instead of the video. The same thing occurs with most DVD software players. But I have no idea how to realize :(
Posted on 2001-06-14 05:34:00 by beaster
The reason video, and DVD playbacks don't appear is because their GDI driver supports video overlays (similar to hardware rendered mouse cursors). They are a sperate part of the video memory from the frame buffer, and are rendered separately. When you do a GDI read, you simply grab part of the frame buffer, and record it in local memory instead. As the video is not a part of this "grabbed" memory, it doesn't show. However if the card doesn't support video overlays, it will be rendered frame by frame to the normal frame buffer, and get captured in the screen dump. The only problem is it'll kill performance as you are thrashing the frame buffer so much! Plus its pretty damn hard to find a GFX card that doesn't support it. Mirno
Posted on 2001-06-14 05:50:00 by Mirno
And overlays *can* be grabbed, you just need an app that can do it. I think HypersnapDX can. Bogdan, there's no use in trying to prevent people from grabbing your screen. There's too many ways to do it, and you wont get them all. Why is this important, btw? People can always note down the stuff on paper...unless, of course, you're trying to prevent crap like BackOrifice ...
Posted on 2001-06-14 07:03:00 by f0dder
Here's a fresh thought off the top of my head. And it's even simple. To invoke any sort of screen saver, application focus will probably shift to that app (well, not always. Paint Shop Pro for one will do it on a timer). BUT.... to stop the casual coppier, have your app process the lost focus message (whatever it is), and re-paint itself white as that happens. When it regains focus it can go back to normal. Not 100% safe, but aproaching your needs, and in a simple fashion.
Posted on 2001-06-14 07:34:00 by Ernie
Just being nosey, but why would you want to do this? umbongo
Posted on 2001-06-14 08:34:00 by umbongo
Give it up, BogdanOnatu - you can't stop users from copying such information. I mean, they can always use a photo camera to take a picture of the monitor, right? :D BTW, who are you working for? CIA, NSA, or M16?
Posted on 2001-06-14 09:36:00 by Qweerdy
how about making a windows clipboard chainviewer that reacts on bitmaps, discarding any bitmaps placed on the clipboard during it's existence. Points to take into knowledge: bitmaps not of the same size as the screen aren't screen copies :) bitmaps that already were in the clipboard before the application started shouldn't be discarded. I bet the dataformat used will just be a bitmap or a dib :)
Posted on 2001-06-14 13:48:00 by Hiroshimator
You're wasting your time. You can prevent it. But there will always be a way around it. Personally, I think you're on a wild goose chase that will lead to little solutions that will work for awhile, but soon, you'll noticed someone has found a way around it. Use your time for something more productive. Tell us the problem, and maybe someone could come up with a viable alternative.
Posted on 2001-06-14 16:57:00 by Jon Richardson
Hey, thx all for your ideeas...keep them comming ..that is the way "brainstorm" works after all.. just to give u "food for thought": Well i CANT tell you who i am working for, :( sorry starndard NDA but as far as i know it can ve anybody *hehe including CIA, NSA etc) just dosent matter. Sure IS NOT www.nud.ro ;) but u can check: <- hmm I overlooked this -> if u want to see some real romanian amateur beauties Now back to work I havt to do just that: STOP the maximum number of users from geting a copy of the screen ...yeah i know a photo camera can do it...but is not my problem ;) I am also aware i can do it more easy with DirectX (after all i am knowing 2D DX hardcore ;) by now ) Problem is i have to do it with GDI also. It was thinking to stop all and any apps that try to do that from working properly ;) kinda virus detection software only i will detect screen grabbers instead, also stopping PrintScreen to work i belive is quite easy is it not? Clipboard...yeah cool also but i belive a program can easy save the bitmap to a file without placeing it to the clipboard first ... Ernie's ideea also crossed my mind and i think is one of the best ;) if combined with a messge loop stand still ;) ( strange we use this technique in our game but allow PrntScr at Alt+Tab... ) makeing the APP kinda of a MODAL one.... Patching GDI...arghh this is another ideea...but i guess very un orthodox one. video overlay is also cool but one cant make listviews and dialogs in a video overlay can it? (think at all that predefined window controls that make GDI life/developement so much easy) All i can tell (again NDA) is that i am not doing anything wrong with this...just a normal job for me. So keep those ideas flowing... And special THANKS to everyone This message was edited by Hiroshimator, on 6/16/2001 11:21:45 AM
Posted on 2001-06-14 22:16:00 by BogdanOntanu
I'm really not quite sure, but couldn't you use a VxD to intercept the capturing of the screen? I'm not really able to help you any further, but it was just a suggestion. Good Luck.
Posted on 2001-06-14 22:34:00 by usb
yeah, but how is a vxd supposed to stop GetDC WinAPI function to get a handle to the desktop DC and do a BitBlt to a propetary memory DC and the save the DC content to a file just like in the MSDN GDI example? i mean all other Apps must run Ok just not be able to copy my windows DC content ... And yeah i dont want code or other help & stuff just your wild ideeas ;) Thx Anyway
Posted on 2001-06-14 22:46:00 by BogdanOntanu
here's a wild idea: you could ask the user not to make ascreen copy :D
Posted on 2001-06-14 23:05:00 by Hiroshimator
"This graphic will self-destruct in five seconds. Good luck, Jim. {fizzing sound}" Could your program hide its window contents whenever some other program (screen snatcher) becomes "active" in some sense? E.g. on WM_KILLFOCUS? This message was edited by Larry Hammick, on 6/15/2001 8:20:40 AM
Posted on 2001-06-15 00:36:00 by Larry Hammick

 perhaps, Bogdan can place a legal notice :) such as copyright msg
 . it might not stop all, but it sure will stop some from trying
 to get your gdi. spcially people who believe in god and try to
 have faith in him by doing good thing. ;)


 what else? there's no other way...
Posted on 2001-06-15 10:43:00 by disease_2000
Nice i like the jokes ;) esp this one by Larry:
"This graphic will self-destruct in five seconds. Good luck, Jim. {fizzing sound}"
the one with ppl that belive in GOD is a good one also ;) esp. for humman race i mean... well what can i do ... every man has to do its job ;) WM_KILLFOCUS? well i belive i will not get that message every time a timmer fires up will i? I am not sure but i belive an app dose not have to loose focus (or to put it the other way, the app that captures dosent have to gain focus) when a capture is done (either on Hot key or on timmer) And i dont have to do it against you guys, i know u will fast make and ASM proggy to do just that...and i will be able to do little against You... i only have to stop the normal/causal user/or special agent ;) that has little time but can DL any such "freeware" capture proggy from internet ... and wants to make easy money from selling that info ;) :(
Posted on 2001-06-15 20:09:00 by BogdanOntanu
Sorry, Ernie, I overlooked your post and said much the same thing. True, timers would evade WM_KILLFOCUS, no doubt. And is this screen material going through PPP? If it is, you have more than the screen to worry about. A tough opponent might be packin' his own packet driver -- logging everything going in and out. Symantec and others are developing such things for the general market, and the not-so-tough opponents might learn how to use them. "Back Orifice" -- good one f0dder:).
Posted on 2001-06-15 21:21:00 by Larry Hammick