UdecxUsbDevicePlugOutAndDelete function (udecxusbdevice.h)

Disconnects the virtual USB device.

Syntax

NTSTATUS UdecxUsbDevicePlugOutAndDelete(
  [in] UDECXUSBDEVICE UdecxUsbDevice
);

Parameters

[in] UdecxUsbDevice

A handle to UDE device object. The client driver retrieved this pointer in the previous call to UdecxUsbDeviceCreate.

Return value

The method returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method might return an appropriate NTSTATUS error code.

Remarks

If the USB device needs to be removed at runtime, the client driver can call this method to indicate a disconnect event. After this call completes, the client driver can no longer use the device specified by the UdecxUsbDevice parameter; it must create another device by calling UdecxUsbDeviceCreate.

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Minimum KMDF version 1.15
Header udecxusbdevice.h (include Udecx.h)
Library Udecxstub.lib
IRQL PASSIVE_LEVEL

See also

Architecture: USB Device Emulation (UDE)

Write a UDE client driver