IPnpCallback::OnD0Exit method (wudfddi.h)

[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

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

[in] pWdfDevice

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

[in] newState

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

Requirement Value
Target Platform Windows
Header wudfddi.h (include Wudfddi.h)

See also

IPnpCallback

IWDFDevice

IWDFDriver::CreateDevice

WDF_POWER_DEVICE_STATE