Partager via


IOCTL_POWER_QUERY (Windows Embedded CE 6.0)

1/6/2010

This I/O control checks whether changing power state is feasible. This I/O control is deprecated and is not called by Power Manager.

Parameters

  • pBufIn
    [in] Set to a pointer to POWER_RELATIONSHIP. This defines the target device for parent and bus drivers. Otherwise, set to NULL.
  • dwLenIn
    [in] Size of the POWER_RELATIONSHIP structure.
  • pBufOut
    [in] Set to a pointer to CEDEVICE_POWER_STATE. This is the device power state that the system is querying for a pending IOCTL_POWER_SET operation.

    [out] Optional. Set to PwrDeviceUnspecified to veto the query.

  • dwLenOut
    [out] Size of the CEDEVICE_POWER_STATE parameter.
  • pdwActualOut
    [out] Number of bytes passed back in the pBufOut buffer.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

To veto the query, the driver should write PwrDeviceUnspecified into pBufOut. Otherwise, Power Manager assumes that the driver accepted.

Power Manager sends this I/O control only to drivers that support the power management I/O controls.

This is not always sent before a state transition.

The default implementation of Power Manger does not use IOCTL_POWER_QUERY. OEMs can customize Power Manager to call IOCTL_POWER_QUERY and to honor the return value associated with it so that the code supporting IOCTL_POWER_QUERY is still in the model device driver (MDD).

Requirements

Header pm.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Power Management I/O Controls
CEDEVICE_POWER_STATE
IOCTL_POWER_SET
POWER_RELATIONSHIP