ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Serial/Parallel Ports functions
  • Special case
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
sListPort (Function)
In french: sListePort
Returns the list of serial and parallel ports on the computer.
Example
// On veut charger le nom des ports séries présents sur la machine dans un champ Combo.
NomPortsSéries is array of strings = sListPort(1)

FOR EACH sPort IN NomPortsSéries
	ListAdd(COMBO_PortsSeries, sPort)
END
Syntax
<Result> = sListPort([<Type>])
<Result>: Array of strings
Array of strings that contains the names of the sought ports.
<Type>: Optional integer
Type of port to be listed:
  • 0 (default): Lists serial and parallel ports.
  • 1: List serial ports.
  • 2: Lists parallel ports.
Remarks
Linux

Special case

On some Linux distributions (Debian, Ubuntu, etc.), the user must be in the dialout group to be able to use serial ports.
If sListPort returns nothing when it should, make sure you have added the current user to this group with the following shell command:
sudo usermod -a -G dialout USER_NAME
Business / UI classification: Business Logic
Component: wd300com.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help