UdecxUsbDeviceCreate function (udecxusbdevice.h)

Creates a USB Device Emulation (UDE) device object.

Syntax

NTSTATUS UdecxUsbDeviceCreate(
  [in, out]      PUDECXUSBDEVICE_INIT   *UdecxUsbDeviceInit,
  [in, optional] PWDF_OBJECT_ATTRIBUTES Attributes,
  [out]          UDECXUSBDEVICE         *UdecxUsbDevice
);

Parameters

[in, out] UdecxUsbDeviceInit

A pointer to a WDF-allocated structure that contains initialization parameters for the virtual USB device. The client driver retrieved this pointer in the previous call to UdecxUsbDeviceInitAllocate.

[in, optional] Attributes

A pointer to a caller-allocated WDF_OBJECT_ATTRIBUTES structure that specifies attributes for the USB device object.

[out] UdecxUsbDevice

A pointer to a variable that receives a handle to the new UDE device object that represents the virtual USB device.

Return value

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

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