## Physical Device Driver Reference

[prev][next][parent][TOC]

### POWER_GETPOWERSTATE (63h) - Remarks

On input, the ParmLength field indicates the size of the Parameter Packet in bytes. On output, the ParmLength field indicates the minimum required size (in bytes) for the function.

This function is designed to work for devices managed by the APM BIOS and devices which support the Query Power State event message. Initially, the Query Power State event message is sent out to find a device driver which can report the specified device's power state. If none is found, the call is passed on to APM BIOS. If APM BIOS also cannot report on the device's power state (due to the device not being one supported by APM BIOS), the call will fail with a PowerBadDevId error.

Also note that a query for the power state of a class of devices or for the entire system will only succeed if that device ID's power state had previously been set through a Set Power State event message. If not, a PowerBadDevId error will be returned. This is a restriction of the APM BIOS Interface Specification.

If the APM Subsystem is not connected to APM BIOS or is disabled, this command will fail with a ReturnCode value of PowerDisabled. However, it is not required that APM be Engaged to issue this command. This command is supported under APM version 1.1 and higher, but not under APM 1.0. An attempt to issue this command under APM version 1.0 will result in a PowerNotSupported error.