RxUsbQueryDeviceInfo
Appearance
Description
Obtains attachment information about a specific USB device.
Syntax
For access by Device Handle use:
rc = RxUsbQueryDeviceInfo(Handle,Info)
For access by Device Number use:
rc = RxUsbQueryDeviceInfo(Number,Info)
Parameters
- Handle
- the Device Handle received from the previous RxUsbOpen.
- Number
- the Device Number from 1 up to the Total Number from RxUsbQueryNumberDevices.
- Info
- receives USB device attachment information 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
Remarks
The Attachment Information consists of the following:
- UCHAR ctrlID - controller identifier.
- UCHAR deviceAddres - USB device address.
- UCHAR bConfigurationValue - current USB device Configuration Value.
- UCHAR bInterfaceNumber - current index in interface array for this item.
- UCHAR lowSpeedDevice - 0 is full speed, 2 is high speed, else low speed.
- UCHAR portNum - port number to which the USB device is attached.
- USHORT parentHubIndex - index in hub table to parent hub.
- HDEVICE rmDevHandle - Resource Manager device handle.
Example Code
/* add RxUsbQueryDeviceInfo */ rc = RxFuncAdd('RxUsbQueryDeviceInfo','usbcalls','RxUsbQueryDeviceInfo') say '+RxUsbQueryDeviceInfo(),RC=0x'd2x(rc) /* invoke RxUsbQueryDeviceInfo */ drop Info /* receives device information */ rc = RxUsbQueryDeviceInfo(Handle,Info) say '*RxUsbQueryDeviceInfo(),RC=0x'd2x(rc) /* drop RxUsbQueryDeviceInfo */ rc = RxFuncDrop('RxUsbQueryDeviceInfo') say '-RxUsbQueryDeviceInfo(),RC=0x'd2x(rc)