Partager via


IOCTL_POWER_QUERY

This IOCTL queries to determine whether changing power state is feasible.

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 if successful, FALSE otherwise.

Remarks

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

The Power Manager will only send this IOCTL to drivers that support the power management IOCTLs.

This is not always sent before a state transition.

The default implementation of the Power Manger does not use IOCTL_POWER_QUERY. An OEM may choose to customize the 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 MDD.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Pm.h.

See Also

CEDEVICE_POWER_STATE | IOCTL_POWER_SET | POWER_RELATIONSHIP

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.