IPnpCallback::OnD0Exit method

[Applies to UMDF 1.x only]

The OnD0Exit method notifies a driver when a device exits the D0 power state so that the driver can perform necessary operations, such as disabling the device.

Syntax


HRESULT OnD0Exit(
  [in]  IWDFDevice *pWdfDevice,
  [in]  WDF_POWER_DEVICE_STATE newState
);

Parameters

pWdfDevice [in]

A pointer to the IWDFDevice interface for the device object of the device that exits the D0 power state.

newState [in]

A WDF_POWER_DEVICE_STATE-typed value that identifies the new power state that the device is set to after it exits the D0 power state.

Return value

If the OnD0Exit callback method encounters no errors, it must return S_OK or another status code for which SUCCEEDED(status) equals TRUE. Otherwise, it must return a status code for which SUCCEEDED(status) equals FALSE. HRESULT error codes are defined in Winerror.h.

Remarks

A driver registers the IPnpCallback interface when it calls the IWDFDriver::CreateDevice method to create a device object.

Requirements

Header

Wudfddi.h (include Wudfddi.h)

See also

IPnpCallback
IWDFDevice
IWDFDriver::CreateDevice
WDF_POWER_DEVICE_STATE

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.