RxUsbQueryDeviceInfo: Difference between revisions
Appearance
Created page with "==Description== Obtains attachment information about a specific USB device. ==Syntax== <pre> rc = RxUsbQueryDeviceInfo(Handle,Info) </pre> ==Parameters== ; Handle : the Dev..." |
added return codes and moved attachment information to remarks |
||
Line 12: | Line 12: | ||
; Info : receives USB device attachment information as hexadecimal string. | ; Info : receives USB device attachment information as hexadecimal string. | ||
The Attachment Information consists of the following: | ==Return Code== | ||
<pre> | |||
0x0000 - NO_ERROR | |||
</pre> | |||
===Errors=== | |||
<pre> | |||
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 | |||
</pre> | |||
==Remarks== | |||
The Attachment Information consists of the following: | |||
* UCHAR ctrlID - controller identifier. | * UCHAR ctrlID - controller identifier. | ||
Line 22: | Line 36: | ||
* USHORT parentHubIndex - index in hub table to parent hub. | * USHORT parentHubIndex - index in hub table to parent hub. | ||
* HDEVICE rmDevHandle - Resource Manager device handle. | * HDEVICE rmDevHandle - Resource Manager device handle. | ||
==Example Code== | ==Example Code== | ||
<pre> | <pre> | ||
/* add RxUsbQueryDeviceInfo */ | /* add RxUsbQueryDeviceInfo */ | ||
rc = RxFuncAdd('RxUsbQueryDeviceInfo','usbcalls','RxUsbQueryDeviceInfo') | rc = RxFuncAdd('RxUsbQueryDeviceInfo','usbcalls','RxUsbQueryDeviceInfo') | ||
Line 44: | Line 51: | ||
rc = RxFuncDrop('RxUsbQueryDeviceInfo') | rc = RxFuncDrop('RxUsbQueryDeviceInfo') | ||
say '-RxUsbQueryDeviceInfo(),RC=0x'd2x(rc) | say '-RxUsbQueryDeviceInfo(),RC=0x'd2x(rc) | ||
</pre> | </pre> | ||
Revision as of 13:46, 23 January 2017
Description
Obtains attachment information about a specific USB device.
Syntax
rc = RxUsbQueryDeviceInfo(Handle,Info)
Parameters
- Handle
- the Device Handle received from the previous RxUsbOpen.
- 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)