IPnpCallbackSelfManagedIo::OnSelfManagedIoInit 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 OnSelfManagedIoInit method initializes a device's self-managed I/O operations.

Syntax

HRESULT OnSelfManagedIoInit(
  [in] IWDFDevice *pWdfDevice
);

Parameters

[in] pWdfDevice

A pointer to the IWDFDevice interface for the device object of the device for which the self-managed I/O operations are initialized.

Return value

If the OnSelfManagedIoInit callback encounters no errors, it must return S_OK or another status code for which SUCCEEDED(status) equals TRUE.

If it returns a status code for which SUCCEEDED(status) equals FALSE, the framework will not start the device. In this case, the framework calls the driver's IPnpCallbackSelfManagedIo::OnSelfManagedIoFlush and IPnpCallbackSelfManagedIo::OnSelfManagedIoCleanup callback methods.

HRESULT error codes are defined in Winerror.h.

Remarks

A driver registers the IPnpCallbackSelfManagedIo 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

IPnpCallbackSelfManagedIo

IWDFDevice

IWDFDriver::CreateDevice