Recent

Author Topic: Count of port Com ??  (Read 2263 times)

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Count of port Com ??
« on: February 15, 2022, 10:14:02 am »
Hi
i use comport.
my laptop does not has any port com(Serial port) , when i use comport , my program stoped. :o

how can i get count of port ?
how can i check that my laptop(or other devices) has port com or does not?

best regard

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: Count of port Com ??
« Reply #1 on: February 15, 2022, 10:53:03 am »
Use Synaser?
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad


majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: Count of port Com ??
« Reply #3 on: February 15, 2022, 12:58:06 pm »
No I should use tcomport
http://comport.sf.net

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Count of port Com ??
« Reply #4 on: February 15, 2022, 02:33:28 pm »
Hello,
No I should use tcomport
http://comport.sf.net
Why TComport ?
TLazserial is based on TComport and synaser and it has a method to detect the serial ports ( see port settings in the  sertest demo project of Tlazserial)
Friendly, J.P
« Last Edit: February 15, 2022, 02:37:22 pm by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: Count of port Com ??
« Reply #5 on: February 15, 2022, 04:11:21 pm »
Thank you
But I want to use Tcomport.

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: Count of port Com ??
« Reply #6 on: October 02, 2022, 01:16:06 pm »

alpine

  • Hero Member
  • *****
  • Posts: 1038
Re: Count of port Com ??
« Reply #7 on: October 02, 2022, 01:52:47 pm »
No I should use tcomport
http://comport.sf.net
There is a procedure into the CPort.pas doing exactly that:
Code: Pascal  [Select][+][-]
  1. procedure EnumComPorts(Ports: TStrings);
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

superc

  • Full Member
  • ***
  • Posts: 241
Re: Count of port Com ??
« Reply #8 on: October 03, 2022, 09:29:06 am »
Hi
i use comport.
my laptop does not has any port com(Serial port) , when i use comport , my program stoped. :o

how can i get count of port ?
how can i check that my laptop(or other devices) has port com or does not?

best regard

In case you work only under Windows an opportunity could be to use the windows registry, as in the thread here:

https://stackoverflow.com/questions/4999964/serial-port-enumeration-in-delphi-using-setupdigetclassdevs



 

TinyPortal © 2005-2018