If the pchBuffer parameter is NULL and the cchBuffer field of MMIOINFO is 0, buffered I/O is disabled. If pchBuffer is NULL and cchBuffer is not 0 and buffering was enabled before mmioSetBuffer was called and the I/O buffer was allocated by mmioOpen or a previous call to mmioSetBuffer, then mmioSetBuffer reallocates the I/O buffer to be cchBuffer bytes in length. The contents of the buffer are not disturbed in this case (though if the buffer is shrunk, some data will be lost), unless the current file position is in part of the buffer that is truncated.
If pchBuffer is NULL and cchBuffer is not 0 and buffering was disabled before mmioSetBuffer was called, then mmioSetBuffer allocates an I/O buffer of cchBuffer bytes in length, and buffered I/O is enabled.
If pchBuffer is not NULL and cchBuffer is not 0, then pchBuffer is assumed to be a caller-provided I/O buffer of cchBuffer bytes in length, which is used for buffered I/O.