4

I've been trying to find a way to capture a specific window using the Desktop Duplication API rather than clipping a section of the captured desktop.

The issue with clipping is that any overlapping applications will show on top of the one that I'm trying to capture. I'm aware it's possible to capture a specific window, even when it ends up behind another, however, I'm not sure if this is possible with the Destkop Duplication API or if something else is being used for that.

For context, I'm developing a Unity application to view the desktop within virtual reality; Currently I'm using uDesktopDuplication to render the desktop to a material and to provide a way to use the API with C#.

Any suggestions on how to overcome this issue would be greatly appreciated. From my research before posting this, I struggled to find much relevent information on the topic. :)

CurtisVL
  • 41
  • 3
  • 1
    This api was introduced in Win8 to replace the discontinued mirror driver. Meant to duplicate desktops, like the mirror driver did. So sure, seeing overlapping windows back is quite intentional. Wrong api if you need to capture only specific window(s). – Hans Passant Sep 18 '18 at 16:02
  • This is what I asumed too, I was just unsure of a different API to use that would have the same kind of performance. – CurtisVL Sep 18 '18 at 16:36

0 Answers0