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:

Value Description
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:

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in mmsystem.h.
  Import Library: Use winmm.lib.

See Also

Multimedia File I/O Overview, Multimedia File I/O Functions, mmioOpen, MMCKINFO, mmioAscend