Jump to content

RxUsbQueryDeviceReport: Difference between revisions

From EDM2
W.m.brul (talk | contribs)
added return codes
W.m.brul (talk | contribs)
updated syntax and parameters for access by device number
Line 3: Line 3:


==Syntax==
==Syntax==
''For access by Device Handle use:''
<pre>
<pre>
rc = RxUsbQueryDeviceReport(Handle,Report)
rc = RxUsbQueryDeviceReport(Handle,Report)
</pre>
''For acces by Device Number use:''
<pre>
rc = RxUsbQueryDeviceReport(Number,Report)
</pre>
</pre>


==Parameters==
==Parameters==
; Handle : the Device Handle received from the previous RxUsbOpen.  
; Handle : the Device Handle received from the previous RxUsbOpen.  
; Number : the Device Number from 1 up to the Total Number from RxUsbQueryNumberDevices.


; Report :  receives the Compound Descriptor as hexadecimal string.
; Report :  receives the Compound Descriptor as hexadecimal string.

Revision as of 17:29, 23 January 2017

Description

Obtains the Compound Descriptor of a specific USB device.

Syntax

For access by Device Handle use:

rc = RxUsbQueryDeviceReport(Handle,Report)

For acces by Device Number use:

rc = RxUsbQueryDeviceReport(Number,Report)

Parameters

Handle
the Device Handle received from the previous RxUsbOpen.
Number
the Device Number from 1 up to the Total Number from RxUsbQueryNumberDevices.
Report
receives the Compound Descriptor as hexadecimal string.

Return Code

0x0000 - NO_ERROR

Errors

0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF13 - ERROR_I24_INVALID_PARAMETER
0xFF1F - ERROR_GEN_FAILURE
0xFF37 - ERROR_DEV_NOT_EXIST
0xFF57 - ERROR_INVALID_PARAMETER
0xFF6F - ERROR_BUFFER_OVERFLOW
0xFFEA - ERROR_MORE_DATA

Remarks

The Compound Descriptor is the concatenation of Device Descriptor and Configuration Descriptor.

Example Code

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

/* invoke RxUsbQueryDeviceReport */
drop Report /* receives device report */
rc = RxUsbQueryDeviceReport(Handle,Report)
say '*RxUsbQueryDeviceReport(),RC=0x'd2x(rc)

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

Related Functions