🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

interception of handle to serial port

#9759
From: Marcin Kowalski
Date: Mon, 14 Jun 2004 08:45
35 lines
1718 bytes
Hi,

could someone help me with a serious problem regarding handles in bcb:

Suppose we have an application which opens COM port in maneer below
and does something with that (sends/recieves then closes):

//start
HANDLE hComm = CreateFile("COM2",
                      GENERIC_READ | GENERIC_WRITE,
                      0,
                      0,
                      OPEN_EXISTING,
                      0,
                      0);

{...}

CloseHandle(hComm);
//end

We compile, run exe and it goes on.

Is possible that i intercept hComm value in this program from other
application while port is opened so that i could write to the same
port by that second application simultanously? Or does only one
application at one time can do this?
Sure, i cannot open the same port already opened by this exe but if i
could have EXACTLY this handle, it would be very ok...


Thanx for ansver

Marcin K.
WUT
Technical Details
Message-ID: <39f18aff.0406140045.4773dec0@posting.google.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,dde2f17c221ffd72,start
X-Google-Attributes: gid10cc67,public
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews1.google.com!not-for-mail
From: marcin.kowalski@interia.pl (Marcin Kowalski)
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: interception of handle to serial port
Date: 14 Jun 2004 01:45:19 -0700
Organization: http://groups.google.com
Lines: 35
Message-ID: <39f18aff.0406140045.4773dec0@posting.google.com>
NNTP-Posting-Host: 83.31.72.17
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1087202720 8072 127.0.0.1 (14 Jun 2004 08:45:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 14 Jun 2004 08:45:20 +0000 (UTC)