公司的程序用OpenGL写的,本地运行良好,但是一远程就出各种问题,找了好久一直没有结果,后来在微软的官方论坛,某个小角落发现了有哥们也遇到这种问题,原来,OpenGL程序在Remote Desktop中崩溃是个硬伤,有人推荐用VirtualGL,不过
EnumDisplayDevices function貌似可以缓解下这个问题。
http://msdn.microsoft.com/en-us/library/dd162609(v=vs.85).aspx
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. The function fails if iDevNum is greater than the largest device index.
Remarks
To query all display devices in the current session, call this function in a loop, starting with iDevNum set to 0, and incrementing iDevNum until the function fails. To select all display devices in the desktop, use only the display devices that have the DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag in the