SetWindowDisplayAffinity bad usecase

Marius Ukt 0 Reputation points
2024-04-10T09:58:17.7933333+00:00

Hey,

We have a classroom of exam computers that are monitored by the class admin through a remote feed that uses the Windows API to take screenshots at specified intervals. Some students have found that if they execute an app with SetWindowDisplayAffinity(logo_hwnd, WDA_EXCLUDEFROMCAPTURE), it will be invisible to any monitoring tool except physical cameras, thus allowing them to cheat, which is bad. Can a computer administrator execute some command to disable this function? Maybe there is methods to take a screenshot ignoring this setting.

Sincerely, Marius

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,772 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. 尼玛 王 0 Reputation points
    2025-05-28T02:53:14.68+00:00

    DWM is a system component responsible for window synthesis and rendering in Windows. SetWindowDisplayAffinity cannot intercept the synthesis process of kernel level DWM. If the monitoring tool directly calls the DWM synthesis interface, it can still capture the window content

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.