🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: serial COM ports from various COM objects

#5032
From: Alan Bellingham
Date: Tue, 01 Nov 2005 17:30
21 lines
1906 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:

>"Vladimir Afanasyev" <avv@systema.kiev.ua> wrote in message
>
>> Who can tell the way how to access to serial port from
>> COM object (ReadFile, WriteFile :nonverlapped) if
>> CreateFile for serial port was called from another COM object.
>
>You cannot.  Serial and Parallel ports can only have one handle opened to
>them at a time, and that handle has exclusive access.  Two objects cannot
>open the same port at the same time.  The second object will always fail
>until the first object closes the port.

But if the other COM object passes you the handle, then you should be
OK. Since it's in the same thread, I think that should work fine.

Alan Bellingham
-- 
Team Thai Kingdom
<url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions
<url:http://www.borland.com/newsgroups/netiquette.html>      netiquette
Technical Details
Message-ID: <qf9fm19u4gqlt1n66acge6lvq9c5h357n1@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43677c8e$1@newsgroups.borland.com> <4367a444$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a36c2447d040b89c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Alan Bellingham <alanb@episys.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: serial COM ports from various COM objects
Date: Tue, 01 Nov 2005 17:30:35 +0000
Reply-To: alanb@episys.com
Message-ID: <qf9fm19u4gqlt1n66acge6lvq9c5h357n1@4ax.com>
References: <43677c8e$1@newsgroups.borland.com> <4367a444$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.49.31.105
X-Trace: newsgroups.borland.com 1130866225 62.49.31.105 (1 Nov 2005 09:30:25 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail