Changing the I/O Buffer Size

The following example opens a file named SAMPLE.TXT for unbuffered I/O, and then enables buffered I/O with an internal 16K buffer using the mmioSetBuffer function.

HMMIO hFile;

if ((hFile = mmioOpen("SAMPLE.TXT", NULL, MMIO_READ)) != NULL)


// File opened successfully; request an I/O buffer.

if (mmioSetBuffer(hFile, NULL, 16384L, 0))

// Buffer cannot be allocated.


// Buffer allocated successfully.



// File cannot be opened.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples