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..." |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
''For access by Device Handle use:'' | |||
<pre> | <pre> | ||
rc = RxUsbQueryDeviceInfo(Handle,Info) | rc = RxUsbQueryDeviceInfo(Handle,Info) | ||
</pre> | |||
''For access by Device Number use:'' | |||
<pre> | |||
rc = RxUsbQueryDeviceInfo(Number,Info) | |||
</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. | |||
; 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 43: | ||
* 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 58: | ||
rc = RxFuncDrop('RxUsbQueryDeviceInfo') | rc = RxFuncDrop('RxUsbQueryDeviceInfo') | ||
say '-RxUsbQueryDeviceInfo(),RC=0x'd2x(rc) | say '-RxUsbQueryDeviceInfo(),RC=0x'd2x(rc) | ||
</pre> | </pre> | ||
==Related Functions== | ==Related Functions== | ||
* [[RxUsbQueryDeviceReport]] | |||
* [[RxUsbQueryNumberDevices]] | |||
* [[RxUsbOpen]] | |||
[[Category:USBCalls]] | [[Category:USBCalls]] |
Latest revision as of 19:18, 12 February 2017
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)