unniuX
asked on
How to get the power state of a monitor?(working, low power or soft off)
Maybe this API function can do, but I don't know how to get the handle of the monitor.
Could you help me?
BOOL GetDevicePowerState( HANDLE hDevice, BOOL* pfOn);
Parameters
hDevice
[in] Handle to an object on the device, such as a file or socket, or a handle to the device itself.
pfOn
[out] Pointer to the variable that receives the power state. This value is TRUE if the device is in the working state. Otherwise, it is FALSE.
Could you help me?
BOOL GetDevicePowerState( HANDLE hDevice, BOOL* pfOn);
Parameters
hDevice
[in] Handle to an object on the device, such as a file or socket, or a handle to the device itself.
pfOn
[out] Pointer to the variable that receives the power state. This value is TRUE if the device is in the working state. Otherwise, it is FALSE.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you use Win NT (XP,2000,NT4)?
If you do - make sure you have admin rights.
Svetlin
If you do - make sure you have admin rights.
Svetlin
ASKER
Thanks, Svethlin. But there's no way to get the handle of a monitor, because "the DISPLAY symbolic link is off-limits to everyone, including users with administrator rights. The premise behind this is that the Windows NT kernel should be the only one that has control of the video display. "
refer to : http://www.eu.microsoft.com/msj/0398/driver.aspx
I'v given up on it. Bye!
refer to : http://www.eu.microsoft.com/msj/0398/driver.aspx
I'v given up on it. Bye!
ASKER