Desktop Duplication API doesn't work over Remote Desktop for Win10 after Reconnect

Jeet Kaushik 11 Reputation points
2022-10-31T06:50:02.733+00:00

Setup Details:-

Edition Windows 10 Pro
Version 21H2
OS build 19044.2075
Experience Windows Feature Experience Pack 120.2212.4180.0

We are using Desktop Duplication API for screen capture for Windows 10 over RDP, it works fine first time when you establish fresh RDP connection but throws below error after you reconnect.

Error[0x80070057]: CDXGICapture::CaptureToFile failed.

source code: https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/DXGIDesktopDuplication

attaching images when it works and when doesn't

255498-error.png

255499-working.png

Same example works on Windows 2016 Server all the time without any issues

Windows development Windows API - Win32
Windows for business Windows Client for IT Pros User experience Remote desktop services and terminal services
{count} vote

2 answers

Sort by: Most helpful
  1. Jeet Kaushik 11 Reputation points
    2022-10-31T09:55:42.423+00:00

    Yes, its same error, any program can reproduce it.

    images are from this source : https://github.com/GERD0GDU/dxgi_desktop_capture

    1 person found this answer helpful.
    0 comments No comments

  2. Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
    2022-11-01T02:03:29.1+00:00

    Hello @Jeet Kaushik ,
    If you just want to report a problem generally, you can use Feedback hub APP to report with the category: Developer Platform->API Feedback.
    If the issue has a big impact to you and you are seeking any workaround, you can open an incident via 'Contact us' tab at link below so that our engineer can work with you closely: https://developer.microsoft.com/en-us/windows/support/ and please choose the 'Technical Support - Coding/Debugging' for Windows SDK for this issue. In-addition, if the support engineer determines that the issue is the result of a bug the service request will be a no-charge case and you won't be charged.


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.