After you descend into a chunk and read the data in the chunk, you can move the file position (pointer) to the beginning of the next chunk. This is accomplished by ascending out of the chunk using the mmioAscend function. The mmioAscend function specifies a pointer to an MMCKINFO structure identifying a chunk. The function ascends to the location following the end of this chunk. The return value is 0 if the operation is successful; otherwise, the return value specifies an error code.
If the chunk was descended into using mmioDescend, then mmioAscend seeks to the location following the end of the chunk (past the extra pad byte, if any).
If the chunk was created and descended into using mmioCreateChunk (the MMIO_DIRTY flag in the ulFlags field of pckinfo is set), then the current file position is assumed to mark the end of the data portion of the chunk. If the chunk size is not the same as the value that was stored in ckSize of pckinfo before mmioCreateChunk was called, then mmioAscend seeks back and corrects the chunk size in the chunk header before ascending from the chunk. Also, if the chunk size is odd, then mmioAscend writes a null pad byte at the end of the chunk.