🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Serial Comm Stuff

#13356
From: Alan Bellingham
Date: Fri, 17 Oct 2003 12:23
20 lines
1640 bytes
Jim Dodd <bcbuilderboy@yahoo.com> wrote:

>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.

Possibly this may be the problem.

If Colin is using strlen() to work out the length of the buffer, and the
buffer contains a single 0 byte, then the length-to-send will indeed be
zero.

If so, then it's probable that other data containing embedded null bytes
is also getting truncated.

Alan Bellingham
-- 
alanb@episys.com
Technical Details
Message-ID: <slnvovo4eobo5fcsbbgokhpu5dmtb8d9sb@4ax.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-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 05:39:14 PST
From: Alan Bellingham <alanb@episys.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Serial Comm Stuff
Date: Fri, 17 Oct 2003 13:23:35 +0100
Reply-To: alanb@episys.com
Message-ID: <slnvovo4eobo5fcsbbgokhpu5dmtb8d9sb@4ax.com>
References: <3F8FC345.F2899BA6@cablenett.net> <3f8fde04$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.92/32.572
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.129.251.130
X-Trace: newsgroups.borland.com 1066393414 193.129.251.130 (17 Oct 2003 05:23:34 -0700)
Lines: 20
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