Bewerken

Delen via


UdecxUsbDeviceInitAddStringDescriptorRaw function (udecxusbdevice.h)

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

Syntax

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

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.

[in] LanguageId

The language identifier of the string. The client driver must define constants for the language support, such as:

const USHORT US_ENGLISH = 0x409;

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