Article View: borland.public.cppbuilder.nativeapi
Article #12600Re: Opening COM port twice
From: Denville Longhurst
Date: Sat, 29 Nov 2003 17:56
Date: Sat, 29 Nov 2003 17:56
51 lines
2391 bytes
2391 bytes
Both applications are mine, but to test the concept I wrote a very simple terminal which monitored the port, opening with CreateFile( "COM1", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, ... ) I have tried both simple and overlapped. I ran the same application twice (ie simultaneously) but the second instance always gave an access denied error. Thanks for the interest... Denville Leeds, England. "Michael Powell" <powellmw@comcast.net> wrote in message news:3fc8d676@newsgroups.borland.com... > > Can you be more specific? > > Is the first application your own? Or third-party / off-the-shelf? > > Sounds like maybe that application is opening with exclusive read/write > access, not shared. > > Regards, > Michael > > "Denville Longhurst" <Denville@metco.co.uk> wrote in message > news:3fc8c2ee@newsgroups.borland.com... > > Hi > > > > Is it possible for two applications to open a COM port simultaneously? I > > have to share data coming in on a port with another application (both make > > different use of the data). I have tried CreateFile using FILE_SHARE_READ > > (in both apps), and using both overlapped and non-overlapped operation, > but > > in all cases the second application gets File Access Denied. > > > > If it is not possible conventionally, how do I write something like a port > > monitor to achieve the same result ?? > > > > Many thanks for any help, > > > > Denville. > > > > > >
Technical Details
Message-ID:
<3fc8ddb0@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fc8c2ee@newsgroups.borland.com> <3fc8d676@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2de4bbff122c5d89 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-29 10:09:15 PST From: "Denville Longhurst" <Denville@metco.co.uk> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fc8c2ee@newsgroups.borland.com> <3fc8d676@newsgroups.borland.com> Subject: Re: Opening COM port twice Date: Sat, 29 Nov 2003 17:56:09 -0000 Lines: 53 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 NNTP-Posting-Host: 80.0.6.170 Message-ID: <3fc8ddb0@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070128560 80.0.6.170 (29 Nov 2003 09:56:00 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail