I am trying to determine if User Account Control is currently blacking out the screen/asking for permission.
I have an application which uses SlimDX and when UAC takes over the screen it causes the DirectX device to be lost, I can recreate the device once the UAC window has been closed, if I try this before(even in a try{}catch{} and loop the application crashes)
I have looked over at pinvoke and msdn and I can't seem to find anything about this. Does anyone have an ideas?
As a note: I do not want to interact with these prompts in any way, I only want to check if they are open so I can delay the creation of my DirectX device.
If a UAC prompt is currently on screen then C:\Windows\System32\consent.exe
will be running. There are ways to be notified with a event when a program starts or stops, you can use them and have your program perform the action to recreate the DirectX device after the consent.exe program terminates.