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
);
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. |
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:
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.
Multimedia File I/O Overview, Multimedia File I/O Functions, mmioOpen, MMCKINFO, mmioAscend