Jump to content

RxUsbQueryDeviceReport

From EDM2

Obtains the Compound Descriptor of a specific USB device.

Syntax

For access by Device Handle use:

rc = RxUsbQueryDeviceReport(Handle,Report)

For access 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