UdecxUsbDeviceInitSetEndpointsType function (udecxusbdevice.h)

Indicates the type of endpoint (simple or dynamic) in the initialization parameters that the client driver uses to create the virtual USB device.

Syntax

void UdecxUsbDeviceInitSetEndpointsType(
  [in, out] PUDECXUSBDEVICE_INIT UdecxUsbDeviceInit,
  [in]      UDECX_ENDPOINT_TYPE  UdecxEndpointType
);

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] UdecxEndpointType

A UDECX_ENDPOINT_TYPE-type value that indicates the type of USB endpoint.

Return value

None

Remarks

Before creating the virtual USB device, the client driver must indicate the type of endpoint it supports. It can support one of two types (defined in UDECX_ENDPOINT_TYPE):

  • Simple endpoint-The client driver creates all endpoint objects before plugging in the device. The device must have only one configuration and one interface setting per interface.
  • Dynamic endpoint-The client creates endpoint objects in the EVT_UDECX_USB_DEVICE_ENDPOINTS_CONFIGURE callback function. The USB device emulation class extension (UdeCx) invokes the driver's implementation when it gets a request to add or configure endpoints.
The UdecxUsbDeviceInit is an opaque structure that contains pointers to callback functions related to endpoints. If the client driver supports dynamic endpoints, then these callback functions must be implemented by the driver: Before calling this method, the client driver must have set those pointers by calling UdecxUsbDeviceInitSetStateChangeCallbacks.

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)

EVT_UDECX_USB_DEVICE_ENDPOINTS_CONFIGURE

USB endpoints

UdecxUsbDeviceInitAllocate

UdecxUsbDeviceInitSetStateChangeCallbacks

Write a UDE client driver