Mega Search
23.2 Million


Sign Up

Make a donation  
serial com port  
News Group: borland.public.cppbuilder.internet.socket

How can I scan for all available serial com ports?

Thanks,
John 



Vote for best question.
Score: 0  # Vote:  0
Date Posted: 17-Dec-2007, at 4:36 PM EST
From: John
 
Re: serial com port  
News Group: borland.public.cppbuilder.internet.socket
John,

Are you using a serial comm component of some type? Does it have a method
for opening a COM port? I'm using an old C++ Builder shareware component
called ZComm (still available), and I use a brute-force method to make a
list of available COM ports, as outlined below. Note that the resulting list
will not contain COM ports that exist but are already in use.

Joe

for (int i=1; i<=256; i++)
{
    if (open_com(i) == true)
    {
        add i to list
        close_com(i)
    }
}

"John"  wrote in message
news:4766f9fb$1@newsgroups.borland.com...
> How can I scan for all available serial com ports?
>
> Thanks,
> John
>
>



Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 17-Dec-2007, at 7:41 PM EST
From: Joe Pasquariello