🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Serial Comm Stuff

#13354
From: Colin Maharaj
Date: Fri, 17 Oct 2003 10:24
22 lines
1507 bytes
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.


code snipette.......


  if (!WriteFile(hComm, lpBuf, dwToWrite, &dwWritten, &osWrite))
  {
     if (GetLastError() != ERROR_IO_PENDING)
     {
        // WriteFile failed, but isn't delayed. Report error and abort.
        fRes = FALSE;
     }
     else
     {
        // Write is pending.
        dwRes = WaitForSingleObject(osWrite.hEvent, INFINITE);
Technical Details
Message-ID: <3F8FC345.F2899BA6@cablenett.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,67ff0e8d56216b03,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-17 03:30:46 PST
Message-ID: <3F8FC345.F2899BA6@cablenett.net>
Date: Fri, 17 Oct 2003 06:24:05 -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: Serial Comm Stuff
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 196.32.37.84
X-Trace: newsgroups.borland.com 1066386339 196.32.37.84 (17 Oct 2003 03:25:39 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail