On Wed, 29 Sep 2010, Bo Berglund wrote:

Graeme Geldenhuys wrote:
On 28 September 2010 21:50, steveg <ste...@nevets.com.au> wrote:
Quickest way I have found is to enumerate the device files in /dev
extracting all 'ttyxx' (comports) and 'ttyU' (usb ports).
This gives a list
of 'probables'. Then try to connect (using SynaSer for
example) to verify
actual usable ports in the list

I think you can narrow that down to only the following:

Serial (COM) ports:  /dev/ttyS*
USB ports:  /dev/ttyU*


absolutely correct - forgot to add the 'S' in my note :)
sorry about that


Fine, so now I have to find code to do a listing of files...
I guess that FindFirst and FindNext from Windows API does
not work...
How is it done in FPC/Lazarus to list files in a directory?
Especially on Linux.

FindFirst/Findnext in the sysutils unit works on all platforms.

Michael.

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to