Article View: borland.public.cppbuilder.nativeapi
Article #8003Serial (com) port problems
From: Janne S
Date: Mon, 06 Dec 2004 16:01
Date: Mon, 06 Dec 2004 16:01
24 lines
1718 bytes
1718 bytes
If I try to open a com port "com10" or higher I get an run-time error. Com
port "com1" - "com9" works fine.
(I use virtual comports from Tibbo, and when I use Microsoft�s HyperTerminal
it actually works)
Here is my code to open the comport!
Works fine for "com1" to "com9".... What is wrong?
//---------------------------------------------------------
hComm = CreateFile("COM10",
GENERIC_READ | GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
0,
0);
// IF THE PORT CANNOT BE OPENED, BAIL OUT.
if(hComm == INVALID_HANDLE_VALUE)
Application->Terminate();
//---------------------------------------------------------
Regards Jan
Technical Details
Message-ID:
<41b48244@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,16ee7b2068445577,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII Reply-To: "Janne S" <jan.sahlen@spminstrument.se> From: "Janne S" <jan.sahlen@spminstrument.se> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Serial (com) port problems Date: Mon, 6 Dec 2004 17:01:08 +0100 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 195.22.72.234 Message-ID: <41b48244@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1102348868 195.22.72.234 (6 Dec 2004 08:01:08 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail