🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8006

Re: Serial (com) port problems

#8006
From: Pete Fraser
Date: Mon, 06 Dec 2004 17:00
30 lines
2089 bytes
Try   CreateFile("\\\\.\\COM10", and see if that works.
HTH Pete

"Janne S" <jan.sahlen@spminstrument.se> wrote in message 
news:41b48244@newsgroups.borland.com...
> 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: <41b49267@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!213.73.255.4.MISMATCH!newsfeed.multikabel.nl!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41b48244@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,16ee7b2068445577
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII
From: "Pete Fraser" <pete._no_spam_fraser@frasersoft.nospam.net>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41b48244@newsgroups.borland.com>
Subject: Re: Serial (com) port problems
Date: Mon, 6 Dec 2004 17:00:00 -0000
Lines: 32
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; Response
NNTP-Posting-Host: 195.12.18.1
Message-ID: <41b49267@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1102352999 195.12.18.1 (6 Dec 2004 09:09:59 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!213.73.255.4.MISMATCH!newsfeed.multikabel.nl!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail