Article View: borland.public.cppbuilder.nativeapi
Article #3472Com port error
From: JD
Date: Thu, 15 Jun 2006 18:19
Date: Thu, 15 Jun 2006 18:19
18 lines
1432 bytes
1432 bytes
I'm trying to setup a test application that mimics a device that would be connect to a com port so that I can test a thread that collects data from the device. The problem that I'm having is that I want the thread to use WaitCommEvent which means that when I open the port using CreateFile, I must specify FILE_FLAG_OVERLAPPED for the dwFlagsAndAttributes parameter. When the port is opened this way, WriteFile fails with an error code of 997 which translates to "Overlapped I/O operation is in progress". Does anyone have any thoughts on how I might accomplish what I want (just a small test that will write data to the port)? ~ JD
Technical Details
Message-ID:
<4491a4c2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f1782b94b4ced041 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Com port error Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 152.163.100.201 X-Forwarded-For: 172.144.226.132 NNTP-Posting-Host: 207.105.83.66 Message-ID: <4491a4c2$1@newsgroups.borland.com> Date: 15 Jun 2006 11:19:46 -0700 X-Trace: newsgroups.borland.com 1150395586 207.105.83.66 (15 Jun 2006 11:19:46 -0700) Lines: 19 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail