PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
USBListDevice (Function)
In French: USBListePériphérique
Returns the list of USB devices currently plugged into the current computer.
Example
// List of USB devices
sList is string = USBListDevice()
// Start to explore without specifying an identifier
Explore("")
// -----------------------------------------------------------
// Explore the entire tree structure
PROCÉDURE Explore(sBeginning)
sList is string
sList = USBListDevice(sBeginning)
IF sList <> "" THEN
sDevice is string
FOR EACH STRING sDevice OF sList SEPARATED BY CR
   Trace(USBProperty(sDevice, USBPropertyDeviceDesc))
   Explore(sDevice)
END
END
Syntax
<Result> = USBListDevice([<Device Identifier> [, <Options>]])
<Result>: Character string
  • List of identifiers for the USB devices currently plugged into the current computer. This list has the following format:
    <Identifier 1> + CR + <Identifier 2> + CR + ...

    If the <Options> parameter corresponds to the USBLstDescription constant, the list of identifiers has the following format:
    <Identifier 1> + TAB + <Description 1> + CR + <Identifier 2> + CR + ...

    The identifier is used to identify a USB device. This identifier will be used by the USB functions to handle a device.
  • Empty string ("") if no USB device is found.
<Device Identifier>: Optional character string
Identifier of USB device from which the search will be performed (see the notes)
<Options>: Optional Integer constant
Detailed option of result:
USBLstDescriptionUsed to get the list of identifiers for the USB devices and their description.
Remarks
The USB devices are organized in tree structure.
The roots are the USB controllers. The hubs and the devices are located below. Each device can be "parent" of a "sub-tree".
For example, a USB hub can access the devices plugged into it.
USBListDevice can be called without identifier. In this case, the function returns the identifiers of the USB controllers. If USBListDevice is called again with these identifiers, you will be able to retrieve the list of devices plugged into it. This tree structure can be browsed until the function returns "" (empty string).
Components
WINDEVReports and Queries wd230std.dll
See also
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment