Remote desktop behavior with 3D3 Device and RDP window minimize

这一生的挚爱 提交于 2021-02-08 03:50:20

问题


In our C# WPF we use a 3rd party (unmanaged) library that display a map.
We use the System.Windows.Interop.D3DImage class.
The 3rd party library uses Direct3D for the the IntPtr32 surface location property.

When i open a remote desktop from another computer and trying to view the WPF Client, we see the map.
Once the WPF UI Client is up, and I minimize the RDP session or close the RDP i will get exception:

Direct3D device is lost

From my experience with video streaming applications, When a window is minimized, it is stop rendering the image in order to save bandwitdh.
I guess rdp is acting the same ? Is it configureable ? I wish to continue streaming even if window is minimized.

I know that there are additional settings in the .RDP file as mentioned here.
The directx is set to: redirectdirectx:i:1

Partial answer so far:
When RDP client application is connecting to RDP Service, when the window is shown, it is GUI mode, when it is minimized, it is GUI-LESS mode, and the Direct 3D Components are really lost. in order to keep them alive during minimize, a registry key must be turned on (RemoteDesktop_SuppressWhenMinimized)


回答1:


From this page: http://www.networkautomation.com/urc/knowledgebase/running-interactive-tasks-in-minimized-remote-desktop-windows/4ecdf43e03470/

Use this key for 1 particular user (use HKLM for all users):

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\RemoteDesktop_SuppressWhenMinimized

type = DWORD

Values:

0 = SUPPRESS_WHEN_MINIMIZED_AUTO

1 = SUPPRESS_WHEN_MINIMIZED_ENABLE

2 = SUPPRESS_WHEN_MINIMIZED_DISABLED



来源:https://stackoverflow.com/questions/36449735/remote-desktop-behavior-with-3d3-device-and-rdp-window-minimize

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!