When you reach the end of the file I/O buffer, use mmioAdvance to advance the buffer. Advancing the buffer allows you to fill a file I/O buffer from disk (MMIO_READ). If there is not enough data remaining in the file to fill the buffer, the pchEndRead field in the MMIOINFO structure points to the location following the last valid byte in the buffer.

mmioAdvance also allows you to empty the contents of the current buffer to disk (MMIO_WRITE) by setting the MMIO_DIRTY flag in the ulFlags field of the MMIOINFO structure. mmioAdvance updates the fields in the MMIOINFO structure to reflect the new state of the I/O buffer (including pchNext, pchEndRead, and pchEndWrite).


[Back] [Next]