Search code examples
dxgidesktop-duplication

Is there any way to omit a window from Desktop Duplication?


I'd like to be able to show a window containing a message that is displayed to the user but which is not captured by Desktop Duplication. Is that possible?

Alternatively, is there a way I can draw over the top of the desktop surface before it gets shown to the user? (ideally without massively stalling the GPU)

Background: I'm writing a remote viewing / support application, and want to allow the remote user to work in privacy - blanking the user's screen while not interfering with capture.

I'd like to avoid falling back to the dark days of WM_PRINT and BitBlt, but I'm not sure DXGI allows what I want to do.


Solution

  • Desktop Duplication copies composed image delivered to video output and your idea is to have it working not just excluding specific region(s) but also have operating system rendering/composition activity for the windows behind the window in question, the composition which is not necessary for the normal desktop operation. Such composition is not actually happening in first place and Desktop Duplication does not offer services to force it or otherwise separate image data on per-window basis.