🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: winapi WriteFile single byte and buffering

#786
From: Ed Mulroy [TeamB]
Date: Thu, 10 Jan 2008 15:55
21 lines
1905 bytes
WriteFile is an operating system function and buffering for it is up to the 
OS.  Your only controls over buffering are from specifying one of 
FILE_FLAG_WRITE_THROUGH and FILE_FLAG_NO_BUFFERING in the call to 
CreateFile.  Both of them limit or remove the effects of buffering.  However 
without them, the OS still determines what buffering it will provide so is 
free to decide what size buffer to use including using no buffer.

Typically the writes to a hard drive are buffered for performance.

For more detail read the help file documentation on CreateFile.

.  Ed

> John Grabner wrote in message
> news:47859f0a$1@newsgroups.borland.com...
>
>I am using WrtieFile to write a lot of single bytes to a file. Reading the 
>documentation I cannot work out if I can have a buffered write and if so 
>how do to do a buffered write.
>
> Any one know the answer?
Technical Details
Message-ID: <47864010$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47859f0a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,dda6b5e99e5dd7cc
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <47859f0a$1@newsgroups.borland.com>
Subject: Re: winapi WriteFile single byte and buffering
Date: Thu, 10 Jan 2008 10:55:58 -0500
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 71.77.53.190
Message-ID: <47864010$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1199980560 71.77.53.190 (10 Jan 2008 07:56:00 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail