Name
SetIOMode -- switch between buffered and unbuffered IO (V2.5)
Synopsis
SetIOMode(mode)
Function
This function can be used to specify the IO mode the functions of the Hollywood DOS library shall use. By default, all DOS functions use buffered IO. This is especially efficient for small read and write operations. For some cases, however, buffered IO is not very convenient and you might want to use unbuffered IO instead. For example, when you write to the parallel device using the DOS library or you have opened a console window using OpenFile(). In those cases unbuffered IO is to be preferred because the data is passed directly to the file system.

The mode you set using this function is respected by all functions of the DOS library but please note that if you switch between buffered and unbuffered IO on the same file, you have to use FlushFile() to flush all pending buffers. If you forget to do this, you might end up with data at the wrong positions in your file.

This function is meant for advanced users. Normally, you do not have to care about the IO mode.

Inputs
mode
desired IO mode for the DOS library; this can be either #IO_BUFFERED or #IO_UNBUFFERED (by default, Hollywood will always use #IO_BUFFERED)

Show TOC