mmioCreateChunk



The mmioCreateChunk function creates a chunk in a RIFF file that was opened by using themmioOpen function. The new chunk is created at the current file position. After the new chunk is created, the current file position is the beginning of the data portion of the new chunk。

本函数在一个通过mmioOpen函数打开的RIFF文件中建立一个块。这个新的部分被建立在正确的文件位置。这个新块被创建后,正确的文件位置是新块的数据部分的开始。

MMRESULT mmioCreateChunk
   (
   HMMIO hmmio,
   LPMMCKINFO lpck,
   UINT wFlags
   ); 

Parameters

hmmio

File handle of an open RIFF file.

打开的RIFF文件的文件句柄。

lpck

Pointer to a buffer that receives a MMCKINFO structure containing information about the chunk to be created.

指向一个缓冲区,接收一个MMCKINFO结构包含的信息,关于这个被创建的块。

wFlags

Flags identifying what type of chunk to create. The following values are defined.

Flags识别什么类型的块要被创建。随后的值被定义

ValueMeaning
MMIO_CREATELIST"LIST" chunk.
MMIO_CREATERIFF"RIFF" chunk.

Return Values

Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.

如果成功,返回MMSYSERR_NOERROR,否则将包含后面的这些可能的错误值。

ValueDescription
MMIOERR_CANNOTSEEKUnable to determine offset of the data portion of the chunk.
MMIOERR_CANNOTWRITEUnable to write the chunk header.

Remarks

注意:

This function cannot insert a chunk into the middle of a file. If an application attempts to create a chunk somewhere other than at the end of a file, mmioCreateChunk overwrites existing information in the file.

本函数不能插入一个块到文件的中间,如果一个程序试图创建一个块在超出文件结尾的某个地方,本函数覆盖文件中存在的信息。

The MMCKINFO structure pointed to by the lpck parameter should be set up as follows:

  • The ckid member specifies the chunk identifier. If wFlags includes MMIO_CREATERIFF or MMIO_CREATELIST, this member will be filled by mmioCreateChunk.
  • The cksize member specifies the size of the data portion of the chunk, including the form type or list type (if any). If this value is not correct when the mmioAscend function is called to mark the end of the chunk, mmioAscend corrects the chunk size.
  • The fccType member specifies the form type or list type if the chunk is a "RIFF" or "LIST" chunk. If the chunk is not a "RIFF" or "LIST" chunk, this member does not need to be filled in.
  • The dwDataOffset member does not need to be filled in. The mmioCreateChunk function fills this member with the file offset of the data portion of the chunk.
  • The dwFlags member does not need to be filled in. The mmioCreateChunk function sets the MMIO_DIRTY flag in dwFlags.

Requirements

  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Mmsystem.h; include Windows.h.
  Library: Use Winmm.lib.

See Also

mmioOpenMMCKINFOmmioAscend

http://msdn.microsoft.com/en-us/library/ms712158

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值