WdfIoTargetStart method
[Applies to KMDF and UMDF]
The WdfIoTargetStart method starts sending queued requests to a local or remote I/O target.
Syntax
NTSTATUS WdfIoTargetStart(
[in] WDFIOTARGET IoTarget
);
Parameters
- IoTarget [in]
-
A handle to a local or remote I/O target object that was obtained from a previous call to WdfDeviceGetIoTarget or WdfIoTargetCreate, or from a method that a specialized I/O target provides.
Return value
WdfIoTargetStart returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method might return one of the following values:
Return code | Description |
---|---|
|
The device has been removed. |
This method also might return other NTSTATUS values.
A bug check occurs if the driver supplies an invalid object handle.
Remarks
If your driver can detect recoverable device errors, you might want your driver to call WdfIoTargetStop to temporarily stop sending requests, then later call WdfIoTargetStart to resume sending requests.
Additionally, if a driver calls WdfUsbTargetPipeConfigContinuousReader to configure a continuous reader for a USB pipe, the driver's EvtDeviceD0Entry callback function must call WdfIoTargetStart to start the reader.
Your driver must call WdfIoTargetStart and WdfIoTargetStop synchronously. After the driver calls one of these functions, it must not call the other function before the first one returns.
For more information about WdfIoTargetStart, see Controlling a General I/O Target's State.
For more information about I/O targets, see Using I/O Targets.
Examples
The following code example shows how an EvtDeviceD0Entry callback function can call WdfIoTargetStart, if the driver uses a continuous reader for a USB pipe.
NTSTATUS MyEvtDeviceD0Entry( IN WDFDEVICE Device, IN WDF_POWER_DEVICE_STATE PreviousState ) { PDEVICE_CONTEXT pDeviceContext; NTSTATUS status; pDeviceContext = GetMyDeviceContext(Device); status = WdfIoTargetStart(WdfUsbTargetPipeGetIoTarget(pDeviceContext->InterruptPipe)); return status; }
Requirements
Minimum KMDF version | 1.0 |
---|---|
Minimum UMDF version | 2.0 |
Header |
|
Library |
|
IRQL | <=DISPATCH_LEVEL |
DDI compliance rules | DriverCreate, FailD0EntryIoTargetState, KmdfIrql, KmdfIrql2 |
See also
- EvtDeviceD0Entry
- WdfDeviceGetIoTarget
- WdfIoTargetCreate
- WdfIoTargetStop
- WdfUsbTargetPipeConfigContinuousReader