Online Development Notebook > Index > Programming Overview > 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.


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

Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 46 of 126)

This page is created with TreePad