mmioFlush

Syntax

WORD mmioFlush(hmmio, wFlags)

This function writes the I/O buffer of a file to disk, if the I/O buffer has been written to.

Parameters

HMMIO hmmio

Specifies the file handle of a file opened with mmioOpen.

WORD wFlags

Is not used and should be set to zero.

Return Value

The return value is zero if the function is successful. Otherwise, the return value specifies an error code. The error code can be one of the following codes:

MMIOERR_CANNOTWRITE

The contents of the buffer could not be written to disk.

Comments

Closing a file with mmioClose will automatically flush its buffer.

If there is insufficient disk space to write the buffer, mmioFlush will fail, even if the preceding mmioWrite calls were successful.