D3D Device Failure During Screen Locked D3D Device Failure During Screen Locked windows windows

D3D Device Failure During Screen Locked


The legacy Direct3D 9 interface considers the 'secure desktop' to be a lost device scenario. Use of a WDDM aware version of Direct3D (Direct3D9Ex, Direct3D 10.x, or Direct3D 11.x) will avoid this problem.


Could it be that you need a different value for BackBufferFormat different than D3DFMT_UNKNOWN, due to only windowed apps allowing that value, just like OJ stated here?


My memory is hazy, but I believe this is a known limitation ("by design") with D3D with respect to the lock screen (and running as a service).

Even if you could create the D3D device, you won't be able to draw on top of the lock screen. So you'll probably be better off designing your app such that it defers the D3D device creation until after the screen becomes unlocked.

Use WTSRegisterSessionNotification to register for notifications of when the screen becomes locked or unlocked.