Jump to content

RxUsbQueryDeviceInfo

From EDM2
Revision as of 03:32, 11 January 2017 by Martini (talk | contribs) (Created page with "==Description== Obtains attachment information about a specific USB device. ==Syntax== <pre> rc = RxUsbQueryDeviceInfo(Handle,Info) </pre> ==Parameters== ; Handle : the Dev...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

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.

Return Code

Errors

Remarks

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)

Related Functions