Jump to content

RxUsbQueryStringReport: Difference between revisions

From EDM2
Created page with "==Description== Obtains the array of languages supported by a USB device. Obtains the specified string descriptor of a USB device. ==Syntax== <pre> rc = RxUsbQueryStringRep..."
 
W.m.brul (talk | contribs)
No edit summary
Line 1: Line 1:
==Description==
==Description==
Obtains the array of languages supported by a USB device. Obtains the specified string descriptor of a USB device.  
Obtains the array of languages supported by a USB device.
Obtains the specified string descriptor of a USB device.  


==Syntax==
==Syntax==
Line 15: Line 16:


; Report : receives the String Report as hexadecimal string.  
; Report : receives the String Report as hexadecimal string.  


==Return Code==
==Return Code==
 
<pre>
0x0000 - NO_ERROR
</pre>
===Errors===
===Errors===
 
<pre>
0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF1F - ERROR_GEN_FAILURE
0xFF57 - ERROR_INVALID_PARAMETER
</pre>
==Remarks==
==Remarks==


Line 39: Line 46:
rc = RxFuncDrop('RxUsbQueryStringReport')
rc = RxFuncDrop('RxUsbQueryStringReport')
say '-RxUsbQueryStringReport(),RC=0x'd2x(rc)
say '-RxUsbQueryStringReport(),RC=0x'd2x(rc)
</pre>
</pre>



Revision as of 13:32, 23 January 2017

Description

Obtains the array of languages supported by a USB device. Obtains the specified string descriptor of a USB device.

Syntax

 rc = RxUsbQueryStringReport(Handle,Index,Language,Report)

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.
Report
receives the String Report as hexadecimal string.

Return Code

0x0000 - NO_ERROR

Errors

0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF1F - ERROR_GEN_FAILURE
0xFF57 - ERROR_INVALID_PARAMETER

Remarks

Example Code

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

/* invoke RxUsbQueryStringReport */
Index=2 /* second string descriptor index */
Language=x2d(0409) /* the english language */
drop Report /* receives string report */
rc = RxUsbQueryStringReport(Handle,Index,Language,Report)
say '*RxUsbQueryStringReport(),RC=0x'd2x(rc)

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

Related Functions