Meet us at at Real World in Orlando, Florida.

All functions   Mac OS X   Windows   Crossplatform   Components   Guides  
New in version: 2.0   2.1   2.2   2.3   2.4   2.5   2.6   2.7   2.8  

USB.FindDevice

Component: USB
Version: 2.4
Mac OS X: Works
Windows: Works

MBS( "USB.FindDevice"; VendorID; ProductID )

Parameters

Parameter Description Example value
VendorID The vendor ID of the device to find. Typically a number between 1 and 65535. 1452
ProductID The product ID of the device. Typically a number between 1 and 65535. 545

Result

The index of the device in our USB device list.

Description

Finds USB devices.
Please call USB.Count before you use this function. Pass IDs for vendor and product. e.g. Apple has vendor ID 1452 (hex 05ac). An Apple keyboard can have a product ID of 545 (hex 0221). Please note that product and vendor IDs are shown usually as hexadecimal values.

Examples

Find a device and query it's product name:

$count = MBS( "USB.Count" )
$index = MBS( "USB.FindDevice"; $VendorID; $ProductID )
$name = MBS( "USB.GetProductName"; $index )

Feedback: Report problem or ask question.




Links
MBS REALbasic Plugins - Nachhilfe in Nickenich