3

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?

Amogh
  • 4,220
  • 9
  • 36
  • 91
  • No you cant stop people from reading the screen, well not any way i know of, however you can turn the network off – TheGeneral May 24 '18 at 05:00
  • @TheGeneral reading?? You meant for recording I guess, but I am not asking for preventing people to stop recording I am just asking to preventing content (HTML) to get recorded like HDCP or VLC player's "directx video output" – Amogh May 24 '18 at 05:11
  • There is no 100 percent reliable way of doing this i can see, I mean you can capture (record) a screen in many different ways. the only thing i can think of is stopping dirty little fingers from installing software on your pc, using a decent virus scanner, disabling the network – TheGeneral May 24 '18 at 05:40
  • 2
    What if I use my smartphone to record the screen? You might want to think of a less software oriented solution: is someone monitoring the students as they sit the exam? – jonatan May 24 '18 at 05:44
  • @jonatan, If exam is center based then of course there will be a supervisor to keep watch on them and also in this case systems can be as per recommendations and as we are providing online exam also so in some exams candidates can give their exam (mock) from anywhere (home/cafe/college campus etc.). For home based exam we want this solution – Amogh May 24 '18 at 06:01
  • @TheGeneral Of course candidate can capture image through mobile but rather than thinking of this, application should prevent possible cheating through technology. However, my application is doing video recording using webcam while solving the exam. – Amogh May 25 '18 at 05:10

1 Answers1

5

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:

enter image description here

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

Amogh
  • 4,220
  • 9
  • 36
  • 91
  • Check [this](https://stackoverflow.com/questions/56302217/prevent-desktop-sharing-of-a-particular-c-sharp-winforms-or-detect-desktop-shari) for more details explanation. – Amogh Sep 09 '19 at 12:09