The mmioFlush function writes the I/O buffer of a file to disk if the buffer has been written to.
本函数写一个文件的I/O缓冲区到磁盘,如果这个缓冲区已经被写入数据。
我自己的一个例子刚好验证了这个功能:
http://wmnmtm.blog.163.com/blog/static/3824571420111014112139474/
Syntax
MMRESULT mmioFlush( HMMIO hmmio, UINT fuFlush );
Parameters
-
hmmio
-
File handle of a file opened by using the mmioOpen function.
fuFlush
-
Flag determining how the flush is carried out. It can be zero or the following.
Flag决定如何输出,它可以是0或是以下值:
Value Description MMIO_EMPTYBUF Empties the buffer after writing it to the disk.
Return value
Returns zero if successful or an error otherwise. Possible error values include the following.
Return code | Description |
---|---|
| The contents of the buffer could not be written to disk. |
Remarks
Closing a file with the mmioClose function automatically flushes its buffer.
If there is insufficient disk space to write the buffer, mmioFlush fails, even if the preceding calls of themmioWrite function were successful.
Requirements
Minimum supported client | Windows 2000 Professional |
---|---|
Minimum supported server | Windows 2000 Server |
Header |
|
Library |
|
DLL |
|
Send comments about this topic to Microsoft
Build date: 9/7/2011
http://msdn.microsoft.com/en-us/library/dd757319(v=VS.85).aspx