Article View: borland.public.cppbuilder.internet.socket
Article #658Re: serial com port
From: Joe Pasquariello
Date: Tue, 18 Dec 2007 03:41
Date: Tue, 18 Dec 2007 03:41
27 lines
1491 bytes
1491 bytes
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" <jnguyen@teledrift.com> wrote in message
news:4766f9fb$1@newsgroups.borland.com...
> How can I scan for all available serial com ports?
>
> Thanks,
> John
>
>
Technical Details
Message-ID:
<47674188$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4766f9fb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f449972765dec112 X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Joe Pasquariello" <joep@fenway.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <4766f9fb$1@newsgroups.borland.com> Subject: Re: serial com port Date: Mon, 17 Dec 2007 19:41:45 -0800 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 NNTP-Posting-Host: 64.142.65.234 Message-ID: <47674188$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1197949320 64.142.65.234 (17 Dec 2007 19:42:00 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail