Prevent screen capturing softwares to capture an application screen

℡╲_俬逩灬. 提交于 2020-01-03 20:39:33

问题


I am working on examination system, as a security part of the system I don't want anyone should leak the paper by screen recording or by giving remote using so many free applications for desktop sharing.

First I searched for can I block such applications? But I don't think so, as there so many ways to record/share a screen. Then I got to know about HDCP but I guess it will only application to videos and not to HTML (correct me if I am wrong). SO I want something like HDCP or VLC player's "directx video output" so that content doesn't get captured by printscreen or other screen capture techniques.

I guess D3D9/DDraw overlays are only for video content can I use this for HTML content/in a c# based windows application?


回答1:


I have achieved this by using SetWindowDisplayAffinity, as per MSDN

The display affinity setting. This setting specifies where the window's contents are can be displayed. Set this value to WDA_MONITOR to display the window's contents only on a monitor. Set this value to WDA_NONE to remove the monitor-only affinity.

So setting WDA_MONITOR to handle of WinForm makes it black when print screen or desktop recording or in desktop sharing application.

Image captured through mobile:

However, I am open for any other (better) answer for this.



来源:https://stackoverflow.com/questions/50501280/prevent-screen-capturing-softwares-to-capture-an-application-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!