USBmicro

Your source for USB electrical device interface products.

  • Home
  • Services
    • Design
    • Contact USBmicro
  • Where to buy…
You are here: Home / Documentation / DLL Commands / NumberOfDevices

NumberOfDevices

Return the number of U4x1 devices found


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 Prototype

int USBm_NumberOfDevices( void );

C Example

RobotBASIC

usbm_NumberOfDevices()

Returns the number of U4x1 devices connected to the PC. 0 means there are no devices connected.

Documentation

Open all | Close all