mmioFlush

本文深入探讨了mmioFlush函数的功能,包括其句法、参数、返回值、备注以及实现流程,并通过实际例子验证了其效果。重点解释了如何使用此函数将文件的I/O缓冲区写入磁盘。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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或是以下值:

ValueDescription
MMIO_EMPTYBUFEmpties 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 codeDescription
MMIOERR_CANNOTWRITE

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

Mmsystem.h (include Windows.h)

Library

Winmm.lib

DLL

Winmm.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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值