mmioAscend(3mms) — Subroutines
Name
mmioAscend --- Ascend from a RIFF file chunk to the next chunk in the file
Syntax
#include <mme/mme_api.h>
MMRESULT APIENTRY mmioAscend(HMMIO hmmio,
LPMMCKINFO lpck,
UINT uFlags);
Arguments
HMMIO hmmio
Specifies the file handle to an open RIFF file.
LPMMCKINFO lpck
Specifies a pointer to an MMCKINFO data structure identifying a chunk. The function ascends to the location following the end of this chunk.
The MMCKINFO data structure must be allocated with the mmeAllocMem function before being passed to the mmioAscend function.
See the mmeAllocMem(3mms) reference page for more information about allocating memory for data structures.
UINT uFlags
Not used, set to zero (0).
Description
The mmioAscend function ascends from a RIFF chunk to the next chunk in the file. If the chunk was descended into using the mmioDescend function, then the mmioAscend function seeks to the location following the end of the chunk (past the extra pad byte, if any).
The file position is assumed to be the end of the data portion of the chunk if the chunk was created and descended into using the mmioCreateChunk function, or if the MMIO_DIRTY flag is set in the dwFlags field of the MMCKINFO data structure referenced by the lpck argument.
If the chunk size is not the same as the value stored in the cksize field when the mmioCreateChunk function was called, then the mmioAscend function corrects the chunk size in the file before ascending from the chunk. If the chunk size is odd, the mmioAscend function writes a null pad byte at the end of the chunk. After ascending from the chunk, the current file position is the location following the end of the chunk (past the extra pad byte, if any).
Extensions
None.
Return Values
Returns MMSYSERR_NOERROR if the function is successful; otherwise, it returns one of the following error codes:
MMIOERR_CANNOTWRITE@T{ The contents of the buffer could not be written to disk. T} MMIOERR_CANNOTSEEK@T{ An error occurred while seeking to the end of the file. T}
See Also
mmioCreateChunk(3mms), mmioDescend(3mms), mmioFOURCC(3mms) mmioStringToFOURCC(3mms)