Article View: borland.public.cppbuilder.nativeapi
Article #13355Re: Serial Comm Stuff
From: Jim Dodd
Date: Fri, 17 Oct 2003 12:18
Date: Fri, 17 Oct 2003 12:18
21 lines
1639 bytes
1639 bytes
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:
<3f8fde04$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3F8FC345.F2899BA6@cablenett.net>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:20:44 PST Date: Fri, 17 Oct 2003 08:18:12 -0400 From: Jim Dodd <bcbuilderboy@yahoo.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Serial Comm Stuff References: <3F8FC345.F2899BA6@cablenett.net> In-Reply-To: <3F8FC345.F2899BA6@cablenett.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 65.161.163.42 Message-ID: <3f8fde04$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1066393092 65.161.163.42 (17 Oct 2003 05:18:12 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail