UdecxWdfDeviceAddUsbDeviceEmulation function (udecxwdfdevice.h)

Initializes a framework device object to support operations related to a host controller and a virtual USB device attached to the controller.

Syntax

NTSTATUS UdecxWdfDeviceAddUsbDeviceEmulation(
       WDFDEVICE                WdfDevice,
  [in] PUDECX_WDF_DEVICE_CONFIG Config
);

Parameters

WdfDevice

A handle to the framework device object that the client driver retrieved in the previous call to WdfDeviceCreate.

[in] Config

A pointer to a UDECX_WDF_DEVICE_CONFIG structure that the client driver initialized by calling UDECX_WDF_DEVICE_CONFIG_INIT.

Return value

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

Remarks

The UDE client driver for the emulated host controller and the USB device must call this method after the WdfDeviceCreate call.

During this call, the client driver-supplied event callback implementations are also registered. Supply function pointers to those functions by call setting appropriate members of UDECX_WDF_DEVICE_CONFIG.

The method makes the framework device object capable of performing operations related to a controller and its root hub, such as handling various queues required to process IOCTL requests sent to the attached USB device.

Requirements

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

See also

Architecture: USB Device Emulation (UDE)

Write a UDE client driver