Bewerken

Delen via


UdecxUsbDeviceInitAddDescriptorWithIndex function (udecxusbdevice.h)

Adds a USB descriptor to the initialization parameters used to create a virtual USB device.

Syntax

NTSTATUS UdecxUsbDeviceInitAddDescriptorWithIndex(
  [in, out] PUDECXUSBDEVICE_INIT UdecxUsbDeviceInit,
  [in]      PUCHAR               Descriptor,
  [in]      USHORT               DescriptorLength,
  [in]      UCHAR                DescriptorIndex
);

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

A caller-allocated buffer that contains the USB descriptor to add to the device.

[in] DescriptorLength

The length of the descriptor buffer.

[in] DescriptorIndex

The index of the descriptor.

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)

USB String Descriptors

UdecxUsbDeviceInitAllocate

Write a UDE client driver