0

Can some one explain what exactly happens when user clicks PrntScr key on windows?

Which Process handles the key? How the screen is captured? which function or modules on windows are used to capture screen?

What i know

BitBlt() or StrechBlt() These are GDI function which are not used.

CodeJunkie
  • 113
  • 1
  • 11
  • 1
    This question appears to be off-topic because it is not a programming question. What is your programming question? Do you want to capture the screen programmatically? – Raymond Chen Dec 05 '13 at 16:01
  • @CodeJunkie: One word: WIN32K.SYS. – Xearinox Dec 05 '13 at 16:08
  • @RaymondChen I want to block screen capture ... This can be done by Registrying PrntScr key as hot key ... but on win8 Windows explorer it self register Win+prntScr key as hotkey before anyone else... :-) – CodeJunkie Dec 06 '13 at 06:56
  • 1
    @CodeJunkie: then ask that in your question instead of generically asking about random Windows internals you think that may be relevant! – Matteo Italia Dec 06 '13 at 10:19
  • 1
    Still too general. Do you just want to prevent people from capturing your app's window? Or are you really trying to block it globally? If globally, why? And don't forget that there are ways of capturing the screen other than using PrtSc. For example, there is the Problem Steps Recorder. Are you trying to create a global solution to a local problem? What if the user takes a picture with a digital camera? – Raymond Chen Dec 06 '13 at 15:37
  • @RaymondChen Picture with digital camera is OK. I know there are other ways and i am pretty much able to block them. The problem i am facing is with PrintScr key perticularly – CodeJunkie Dec 09 '13 at 07:28
  • @MatteoItalia No If you can give me precise answer to the flow of PrntScr key handling then i may do something this... But no where i find the handling of the PrntScr key. – CodeJunkie Dec 09 '13 at 07:30
  • Do you want to block the entire screen or just a single window? (The handling of PrtSc is in the kernel. You have no access to it. It is not done by any module and it doesn't happen in any process.) – Raymond Chen Dec 09 '13 at 13:44
  • @RaymondChen What you are trying to say that there is no way that someone can block PrntScr key action. – CodeJunkie Dec 10 '13 at 12:31
  • There are ways of blocking specific scenarios. For example `SetWindowDisplayAffinity` to exclude a window from PrtSc. You haven't described your scenario yet, so I can't give more specific advice. – Raymond Chen Dec 10 '13 at 18:17
  • @RaymondChen The case is that when a specific confidential file is open. I want to block the screen capture. The file is opened in Win Word and my addin in winword know when file opens and when closed. – CodeJunkie Dec 11 '13 at 10:51
  • Okay, so you really want to block just one window, not the entire screen. SetWindowDisplayAffinity does what you want. But Word already does this automatically if the file is IRM-protected, so you should just use the IRM feature. – Raymond Chen Dec 11 '13 at 14:11

0 Answers0