🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Serial Comm Stuff

#13267
From: Colin Maharaj
Date: Fri, 17 Oct 2003 17:33
47 lines
2146 bytes
Hey Jim,

Thanks for responding but I may have found the real problem.....

The fact is, this happens ONLY when I first receive a NULL character.

But if I init my serial com routines to ignore NULL characters I do not
get the problem, but I do not want to ignore null characters..

e.g. 
DCB & DeviceParameter;
...
DeviceParameter.fNull = true; //  ignore NULL
...
SetCommState(hComm, &dcbComm); // init com state...

What should I do???

Thanks!!!



> 

Jim Dodd wrote:
> 
> Colin Maharaj wrote:
> > I am trying to write a buffer in lpBuf.
> > But whenever the buffer has a single NULL character,
> > The line at WaitForSingleObject(osWrite.hEvent, INFINITE);
> > waits forever and I cannot go further.
> >
> > How do I sucessfully send NULL characters.
> >
> >
> Colin,
> 
> It should not be a NULL character that causes the problem. We send them
> all the time. Check that you aren't calling WriteFile() with a buffer
> length of zero (the third argument). I see a note in the source code we
> bought from another vendor that calling WriteFile() with a zero length
> buffer will hang.
> 
> Good luck,
> 
> Jim Dodd
> Onset Computer Corp.
Technical Details
Message-ID: <3F902801.966E31DF@cablenett.net>
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
References: <3F8FC345.F2899BA6@cablenett.net> <3f8fde04$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,67ff0e8d56216b03
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-17 10:39:43 PST
Message-ID: <3F902801.966E31DF@cablenett.net>
Date: Fri, 17 Oct 2003 13:33:53 -0400
From: Colin Maharaj <cbm@cablenett.net>
Reply-To: cbm@cablenett.net
X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Serial Comm Stuff
References: <3F8FC345.F2899BA6@cablenett.net> <3f8fde04$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 196.32.37.70
X-Trace: newsgroups.borland.com 1066412141 196.32.37.70 (17 Oct 2003 10:35:41 -0700)
Lines: 47
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