Detect monitor on/off

Hi!

There any way to detect the monitor PC Desktop state in Windows ON / OFF, using language C/C++?

Thanks
closed account (48T7M4Gy)
I'll ask ... why would you want to know when all you have to do is look at it, or is this Spy vs Spy?
Hi,

I need to record this information for monitoring.
closed account (48T7M4Gy)
I need to record this information for monitoring.
Thought so.

Simple, put a current detector on the power cord and monitor that.

You've still got to defend against your target saying he wasn't looking at the porn so a pressure transducer on his seat and rotation sensor on the swivel part should pin things down.

Make sure you have a warrant. :)
Last edited on
You can do this with powershell, what you want to look at is the power save options.

https://blogs.technet.microsoft.com/heyscriptingguy/2012/11/27/use-powershell-and-wmi-or-cim-to-view-and-to-set-power-plans/

Not C but might give you some clues in getting the WMI info
Last edited on
Topic archived. No new replies allowed.