| Online Development Notebook > Index > ODN > USBm DLL Programming > DLL Commands > NumberOfDevices |
NumberOfDevices
Description:
This is a USBm.dll function that returns the number of valid devices on the USB bus. (0 to 20)
Command Syntax:
number USBm_NumberOfDevices()
The USBm_NumberOfDevices function syntax has these parts:
| Part | Description |
| No argument |
Remarks:
Note: USBm_NumberOfDevices does not return TRUE⁄FALSE. The return value is the number of detected devices.
VB Declaration (USBmAPI.bas)
| Public Declare Function USBm_NumberOfDevices _ Lib "USBm.dll" _ () _ As Integer |
VB Example
| Dim result As Integer result USBm_NumberOfDevices |
This code fragment shows that result is loaded with the number of detected devices.
C Example
-TBD-
| Hardware: U401 USB Interface U421 USB Interface |
| Programming: USBm DLL Programming Download Files |
| Application Notes: U4x1 Application Notes Misc Applications and Information FAQ |