IOCTL_POWER_CAPABILITIES (Compact 2013)
3/26/2014
This I/O control checks device-specific capabilities. Send this message with DeviceIoControl.
Syntax
BOOL DeviceIoControl(
HANDLE hDevice, // handle to the device
DWORD dwIoControlCode, // use IOCTL_POWER_CAPABILITIES
LPVOID lpInBuffer, // pointer to input buffer
DWORD nInBufferSize, // input buffer size
LPVOID lpOutBuffer, // pointer to output buffer
DWORD nOutBufferSize, // output buffer size
LPDWORD lpBytesReturned, // number of bytes returned
OVERLAPPED lpOverlapped // pointer to OVERLAPPED structure
);
Parameters
- hDevice
[in] Handle to the device.
- dwIoControlCode
[in] The control code for the operation. Use IOCTL_POWER_CAPABILITIES for this operation.
- lpInBuffer
[in] Set to a pointer to a POWER_RELATIONSHIP structure. This defines the target device for parent and bus drivers. Otherwise, set to NULL.
- nInBufferSize
[in] Size of the POWER_RELATIONSHIP structure.
- lpOutBuffer
[out] Set to a pointer to a POWER_CAPABILITIES structure. This defines the devices power capabilities.
- nOutBufferSize
[out] Size of the POWER_CAPABILITIES structure.
- lpBytesReturned
[out] Number of bytes passed back in the lpOutBuffer buffer.
Return Values
Returns TRUE if successful; otherwise, returns FALSE.
Remarks
If a driver fails this I/O control, Power Manager assumes that the driver does not handle the remaining I/O controls and does not send them. As a minimum, the driver should complete the DeviceDx in POWER_CAPABILITIES.
During initialization, through this I/O control, the device driver should put the device into D0 and report device capabilities as accurately as possible when queried by Power Manager.
All drivers that support Power Manager must handle this I/O control.
Requirements
Header |
pm.h |
See Also
Reference
Power Management I/O Controls
POWER_CAPABILITIES
POWER_RELATIONSHIP