Click to See Complete Forum and Search --> : Protection from window content copying
nuklus
April 14th, 2003, 03:27 PM
How can I implement the subject? Should I write a driver to disable content copying of window of my application? I need to protect images in my application from copying with 'print screen' key and functions like BitBlt().
mahanare
April 15th, 2003, 12:51 AM
Your thought is interesting. I don't think we can do that.
But Best wishes for your attempt don't forget to post the result in this thread.
cheers
harinath
RockNix
April 15th, 2003, 06:20 AM
of course you can protect your images by installing hooks for the different cases, keyboard hooks for "print key", api hooking for several functions to block, but ...
no matter how many hooks you install remember your image is embedded as a resource in your binary file i guess - ripping resources from a binary is very easy. you will also have to protect your binary from getting ripped, you see ...
nuklus
April 15th, 2003, 07:08 AM
Protection of executable code and resources against reversing engineering is not problem for me. My problem is functions like GetWindowDC() and BitBlt(). I wrote a simple driver which hooks some api in win32k.sys (Windows XP), for example, I hook EngBitBlt(), but I don't know what to do next with its parameters.
RockNix
April 15th, 2003, 07:47 AM
hm, i dont know the way you went, but ...
usually api hooking means to check the parameters coming from the calling process - for example is the requested window handle the one you want to protect. than there are two ways to go.
deny whenever the handles match and its up to you to return an error-value the function normally would return if failed. so the caller will not recognize the hook as long you return a valid error-code ...
if the handle does not match, pass the incoming parameters right to the function as installed in the os and everything is allright.
hope it helps ...
nuklus
April 15th, 2003, 01:53 PM
RockNix, I perfectly know as use hooks when I spoke, that I don't know what to do further with parameters of function - I had in view of, that on entrance parameters (it is type SURFOBJ (see ddk)) I cannot determine yet, that this copying from my window. I thought, that someone already did it. Thanks
galathaea
April 15th, 2003, 03:32 PM
It has been done. But this type of thing is often company protected technology. So all I can suggest, as RockNix has, look up API interception, like that found in Ivo Ivanov's article in the System section of CodeGuru. It is not a windows hook like SetWindowsHookEx, but in ring3 hooks, the DC access commands give you all of the window information if you track it properly...
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.