EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT callback function (wdfdevice.h)

[Applies to KMDF and UMDF]

A driver's EvtDeviceSelfManagedIoInit event callback function initializes and starts the device's self-managed I/O operations.

Syntax

EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT EvtWdfDeviceSelfManagedIoInit;

NTSTATUS EvtWdfDeviceSelfManagedIoInit(
  [in] WDFDEVICE Device
)
{...}

Parameters

[in] Device

A handle to a framework device object.

Return value

If the EvtDeviceSelfManagedIoInit callback function encounters no errors, it must return STATUS_SUCCESS, or another status value for which NT_SUCCESS(status) equals TRUE. Otherwise, it must return a status value for which NT_SUCCESS(status) equals FALSE. If NT_SUCCESS(status) equals FALSE, the framework does not start the device.

If NT_SUCCESS(status) equals FALSE, the framework calls the driver's EvtDeviceSelfManagedIoFlush and EvtDeviceSelfManagedIoCleanup callback functions.

For more information about this callback function's return values, see Reporting Device Failures.

Remarks

To register an EvtDeviceSelfManagedIoInit callback function, a driver must call WdfDeviceInitSetPnpPowerEventCallbacks.

If the driver has registered an EvtDeviceSelfManagedIoInit callback function, the framework calls it once for each device, after the framework has called the driver's EvtDeviceD0Entry callback function for the first time. The framework does not call the EvtDeviceSelfManagedIoInit callback function again for that device, unless the device is removed and reconnected, or the drivers are reloaded.

The EvtDeviceSelfManagedIoInit callback function must initialize and start the self-managed I/O operations that the driver will handle for the device.

For more information about when the framework calls this callback function, see PnP and Power Management Scenarios.

For more information about drivers that provide this callback function, see Using Self-Managed I/O.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)
IRQL PASSIVE_LEVEL

See also

EvtDeviceSelfManagedIoCleanup

EvtDeviceSelfManagedIoFlush

EvtDeviceSelfManagedIoRestart

EvtDeviceSelfManagedIoSuspend