Answered by:
Can't Create Surface unless we "disable full screen optimizations"

Question
-
We have customers using Remote Desktop to log into a Windows 2019 Server running on AWS. Our EXE app starts up and runs just fine and uses DirectX for graphics and sound. But when customers close and reopen the Remote Desktop our app can no longer create DirectX surfaces. Here is the code that fails:
ZeroMemory(&ddsdCur, sizeint(ddsdCur));
ddsdCur.dwSize = sizeint(ddsdCur);
ddsdCur.dwFlags = DDSD_CAPS;
ddsdCur.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
res = IDirectDraw_CreateSurface((LPDIRECTDRAW)pdd, &ddsdCur, (LPDIRECTDRAWSURFACE *)&pddsback, NULL);
if (res != DD_OK) fatalerror();The result code (res) is DDERR_UNSUPPORTEDMODE -- The display is currently in an unsupported mode
We have discovered if we check the new Windows 10 option to "disable full screen optimizations" then everything works as expected. The customers can open and close the Remote Desktop and the app is still there running fine. My questions is this: is there something we can do to be more compatible with full screen optimizations? We don't want to have all customers set this flag. What can we do to be compatible?
Thanks in advance
Friday, August 30, 2019 6:03 PM
Answers
-
Might try asking for help over here.
https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverTS
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/home?forum=wpdevelop
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.
- Edited by Dave PatrickMVP Friday, August 30, 2019 7:21 PM
- Proposed as answer by Richard MuellerMVP, Banned Saturday, August 31, 2019 1:03 PM
- Marked as answer by Richard MuellerMVP, Banned Saturday, September 7, 2019 12:18 PM
Friday, August 30, 2019 7:17 PM
All replies
-
Might try asking for help over here.
https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverTS
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/home?forum=wpdevelop
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.
- Edited by Dave PatrickMVP Friday, August 30, 2019 7:21 PM
- Proposed as answer by Richard MuellerMVP, Banned Saturday, August 31, 2019 1:03 PM
- Marked as answer by Richard MuellerMVP, Banned Saturday, September 7, 2019 12:18 PM
Friday, August 30, 2019 7:17 PM -
thanks will tryFriday, August 30, 2019 7:21 PM
-
Sounds good, you're welcome.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.Friday, August 30, 2019 7:21 PM