Efi_usb_io_protocol.usbgetstringdescriptor(), Usbgetstringdescriptor(), Func – Intel Extensible Firmware Interface User Manual

Page 601

Advertising
background image

Protocols — USB Support

Version 1.10

12/01/02

14-61

EFI_USB_IO_PROTOCOL.UsbGetStringDescriptor()

Summary

Retrieves a Unicode string stored in a USB Device.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USB_IO_GET_STRING_DESCRIPTOR) (

IN

EFI_USB_IO_PROTOCOL

*This,

IN

UINT16

LangID,

IN

UINT8

StringID,

OUT

CHAR16

**String

);

Parameters

This

A pointer to the

EFI_USB_IO_PROTOCOL

instance. Type

EFI_USB_IO_PROTOCOL

is defined in Section 14.2.5.

LangID

The Language ID for the string being retrieved. See the

UsbGetSupportedLanguages()

function description for a

more detailed description.

StringID

The ID of the string being retrieved.

String

A pointer to a buffer allocated by this function with

AllocatePool()

to store the string. If this function returns

EFI_SUCCESS

, it stores the string the caller wants to get. The

caller should release the string buffer with

FreePool()

after the

string is not used any more.

Description

This function is used to retrieve strings stored in a USB device. Strings are stored in a Unicode
format. The string to retrieve is identified by a language and an identifier. The language is
specified by

LangID

, and the identifier is specified by

StringID

. If the string is found, it is

returned in

String

, and

EFI_SUCCESS

is returned. If the string cannot be found, then

EFI_NOT_FOUND

is returned. The string buffer is allocated by this function with

AllocatePool()

. The caller is responsible for calling

FreePool()

for

String

when it is

no longer required.

Status Code Returned

EFI_SUCCESS

The string was retrieved successfully.

EFI_NOT_FOUND

The string specified by

LangID

and

StringID

was not found.

EFI_OUT_OF_RESOURCES

There are not enough resources to allocate the return buffer

String

.

Advertising