Article View: borland.public.cppbuilder.nativeapi
Article #8278Re: Port Scans - unsolved
From: Bob Gonder
Date: Tue, 09 Nov 2004 17:23
Date: Tue, 09 Nov 2004 17:23
40 lines
1907 bytes
1907 bytes
Pete Fraser wrote:
>You don't need the second createfile and in fact it won't work as it's
>already open
>You just change the baud rate.
>(It's the same as opening a file that's already open - it can't be done!)
It can if you open with file sharing enabled.
(But sharing com ports isn't a good idea)
>Note that closePort leaves the handle returned from CreateFile still open.
IOW, use CloseHandle() after ClosePort
For every successful CreateFile, issue a CloseHandle.
Either 1)
> CreateFile
> Set baud rate to 9600
> openPort
test
> close port
> set baud rate to 19200
openPort
test
> close port
CloseHandle
Or 2)
> CreateFile
> Set baud rate to 9600
> openPort
test
> close port
CloseHandle
> CreateFile
> set baud rate to 19200
openPort
test
> close port
CloseHandle
Technical Details
Message-ID:
<cku1p09u6cbcoipjka8j1u8gnunik1l2fo@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<418ebc0d@newsgroups.borland.com> <418f380f@newsgroups.borland.com> <4190dcd2$1@newsgroups.borland.com> <4190df74@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9fcab49b7cf126f6 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Port Scans - unsolved Date: Tue, 09 Nov 2004 09:23:37 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <cku1p09u6cbcoipjka8j1u8gnunik1l2fo@4ax.com> References: <418ebc0d@newsgroups.borland.com> <418f380f@newsgroups.borland.com> <4190dcd2$1@newsgroups.borland.com> <4190df74@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.91.5 X-Trace: newsgroups.borland.com 1100021015 69.69.91.5 (9 Nov 2004 09:23:35 -0700) Lines: 42 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail