The WdfUsbTargetDeviceIsConnectedSynchronous method determines if the specified USB device is connected.
NTSTATUS WdfUsbTargetDeviceIsConnectedSynchronous( [in] WDFUSBDEVICE UsbDevice );
- UsbDevice [in]
A handle to a USB device object that was obtained from a previous call to WdfUsbTargetDeviceCreate.
WdfUsbTargetDeviceIsConnectedSynchronous returns the I/O target's completion status value if the operation succeeds. Otherwise, this method can return one of the following values:
An invalid parameter was detected.
The caller's IRQL was invalid.
The device was not connected.
This method also might return other NTSTATUS values.
A bug check occurs if the driver supplies an invalid object handle.
For more information about the WdfUsbTargetDeviceIsConnectedSynchronous method and USB I/O targets, see USB I/O Targets.
The following code example determines if a specified USB device is connected.
NTSTATUS status; status = WdfUsbTargetDeviceIsConnectedSynchronous(UsbDevice);
|Available in version 1.0 and later versions of KMDF.|
|Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)|