Jump to content

RxUsbStringGetDescriptor

From EDM2
Revision as of 23:41, 20 January 2017 by Martini (talk | contribs) (Created page with "==Description== Executes the Standard Device Request that obtains the String Descriptor. ==Syntax== <pre> rc = RxUsbStringGetDescriptor(Handle,Index,Language,Length,Descript...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Executes the Standard Device Request that obtains the String Descriptor.

Syntax

rc = RxUsbStringGetDescriptor(Handle,Index,Language,Length,Descriptor) 

Parameters

Handle
the Device Handle received from the previous RxUsbOpen.
Index
the Descriptor Index or 0 to obtain the array of Language Codes.
Language
the Language Code or 0 to use the Language Code for English.
Length
the desired number of bytes or 0 for the whole String Descriptor.
Descriptor
the name of the variable to receive the String Descriptor.

Return Code

Errors

Remarks

Example Code

/* add RxUsbStringGetDescriptor */
rc = RxFuncAdd('RxUsbStringGetDescriptor','usbcalls','RxUsbStringGetDescriptor')
say '+RxUsbStringGetDescriptor(),RC=0x'd2x(rc)

/* invoke RxUsbStringGetDescriptor */
Index=2 /* second string descriptor index */
Language=x2d(0409) /* the english language */
Length=0 /* defaults to receive whole descriptor */
drop Descriptor /* receives string descriptor */
rc = RxUsbStringGetDescriptor(Handle,Index,Language,Length,Descriptor)
say '*RxUsbStringGetDescriptor(),RC=0x'd2x(rc)

/* drop RxUsbStringGetDescriptor */
rc = RxFuncDrop('RxUsbStringGetDescriptor')
say  '-RxUsbStringGetDescriptor(),RC=0x'd2x(rc)

Related Functions