Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Winboard problem (maybe Delphi only )

Author: Odd Gunnar Malin

Date: 12:24:19 08/23/03

Go up one level in this thread


On August 23, 2003 at 12:21:42, Russell Reagan wrote:

>On August 23, 2003 at 09:17:45, Tony Werten wrote:
>
>>Is there an API equivalent to setvbuf ?
>
>Aside from turning off buffering, you could flush the buffer after each write
>(fflush() in C, or flush() method for streams in C++). You have to be more
>careful because you have to be sure to flush after each write, but it should
>work the same. I couldn't find any API function to turn off buffering, but there
>was one to flush a file buffer, FlushFileBuffers().
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/flushfilebuffers.asp

I don't think the stdio in Windows Api (ReadFile and WriteFile) have any
buffering. This buffering problem comes from the runtime library.
If he can use WinAPI direct in Delphi, then he could use ReadFile/WriteFile
instead of any runtime function. I use this in my engine and haven't seen any
buffering problem.

Odd Gunnar



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.