Overview
Group
Quick Info

mmioCreateChunk

The mmioCreateChunk function creates a chunk in a RIFF file that was opened by using the mmioOpen 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.

MMRESULT mmioCreateChunk(

HMMIO hmmio,

LPMMCKINFO lpck,

UINT wFlags

);

Parameters

hmmio

File handle of an open RIFF file.

lpck

Address an application-defined MMCKINFO structure containing information about the chunk to be created.

wFlags

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

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:

MMIOERR_CANNOTSEEK
Unable to determine offset of the data portion of the chunk.
MMIOERR_CANNOTWRITE
Unable 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.

See Also

mmioOpen
, MMCKINFO, mmioAscend

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database