EVT_UDECX_USB_DEVICE_ENDPOINT_ADD callback function (udecxusbdevice.h)

The USB device emulation class extension (UdeCx) invokes this callback function to request the client driver to create a dynamic endpoint on the virtual USB device.

Syntax

EVT_UDECX_USB_DEVICE_ENDPOINT_ADD EvtUdecxUsbDeviceEndpointAdd;

NTSTATUS EvtUdecxUsbDeviceEndpointAdd(
  [in] UDECXUSBDEVICE UdecxUsbDevice,
  [in] PUDECX_USB_ENDPOINT_INIT_AND_METADATA EndpointToCreate
)
{...}

Parameters

[in] UdecxUsbDevice

A handle to the UDE device object for which the client driver creates an endpoint. The driver created this object in a previous call to UdecxUsbDeviceCreate.

[in] EndpointToCreate

A pointer to a UDECX_USB_ENDPOINT_INIT_AND_METADATA structure that contains the endpoint descriptor.

Return value

If the operation is successful, the callback function must return STATUS_SUCCESS, or another status value for which NT_SUCCESS(status) equals TRUE.

Remarks

The client driver registered this callback function in a previous call to UdecxUsbDeviceInitSetStateChangeCallbacks by supplying a function pointer to its implementation.

In the implementation, the client driver is expected to create the endpoint by calling UdecxUsbEndpointCreate by using the initialization parameters (UDECXUSBENDPOINT_INIT) passed by the class extension in the UDECX_USB_ENDPOINT_INIT_AND_METADATA structure.

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)
IRQL PASSIVE_LEVEL

See also

Architecture: USB Device Emulation (UDE)

UdecxUsbEndpointCreate

Write a UDE client driver