Platform SDK: Hardware |
The GetDevicePowerState function retrieves the current power state of the specified device.
BOOL GetDevicePowerState( HANDLE hDevice, // device-context handle BOOL *pfOn // receives power state );
If the function succeeds, it returns a nonzero value. Otherwise, the function returns zero.
An application can use GetSystemPowerState to determine whether a disk or other device is spun up. If the device is not spun up, the application should defer accessing it.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Power Management Overview, Power Management Functions, GetSystemPowerStatus