|Online Development Notebook > Index > Programming Overview > DLL Commands > DeviceValid|
DeviceValid - Return a device-present indication
This is a USBm.dll function that returns indication of validity from a USB device.
true⁄false USBm_DeviceValid( device )
The USBm_DeviceValid function syntax has these parts:
|device||Valid device from 0 to the maximum number of devices found (minus 1) . Any other number results in a FALSE return.|
Note: USBm_DeviceValid always returns TRUE if the device is valid, otherwise FALSE.
VB Declaration (USBmAPI.bas)
|Public Declare Function USBm_DeviceValid _|
Lib "USBm.dll" _
(ByVal device As Byte) _
|Dim result As Integer|
result = USBm_DeviceValid 3
This code fragment shows that result is loaded with TRUE if device three exists, or with FALSE if the device does not exist.
|int USBm_DeviceValid( unsigned char device );|
Returns true if the device number refers to a connected and active device. False otherwise.
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