| Online Development Notebook > Index > Programming Overview > DLL Commands > FindDevices |
FindDevices - Find all U4x1 devices
Description:
This is a USBm.dll function that scans all of the HID devices available on the bus. If a device qualifies as a U4x1, then open access to the device and place the device into the internal data structure for U4xx devices. Devices are indexed with a device number starting from 0 to the number of devices found minus one. This function is the initial call to connect devices logically to the PC. Once this function is called (successfully) then access to the device can be done with the device commands.
Command Syntax:
true⁄false USBm_FindDevices()
The USBm_FindDevices function syntax has these parts:
| Part | Description |
| No argument |
Remarks:
Note: USBm_FindDevices returns FALSE for no connected devices, otherwise the return value is TRUE.
VB Declaration (USBmAPI.bas)
| Public Declare Function USBm_FindDevices _ Lib "USBm.dll" _ () _ As Integer |
VB Example
| Dim result As Integer result = USBm_FindDevices |
This code fragment shows that result is loaded with TRUE if devices exist and can be opened by the DLL, or with FALSE.
C Prototype
| int USBm_FindDevices( void ); |
C Example
RobotBASIC
usbm_FindDevices()
Returns -1 (true) if there are U4x1 devices connected to the PC. Returns 0 (false) otherwise. You should call this function before you do anything with devices.
Hardware: U401 USB Interface U421 USB Interface U451 USB Interface
Programming: USBm DLL Programming Download Files
Application Notes: U4x1 Application Notes Misc Applications and Information FAQ
While every effort has been made to make sure that the information posted on this site is correct, the author can not be held liable for any damages whatsoever for losses as a result of the application of this information. Use this information at your own risk.
USBmicro can design your custom and semi-custom USB product. Email about USB design can be directed to " Robert " at usbmicro.com.
Copyright © USBmicro, L.L.C., 2002-2010