MMRESULT mmioAscend(hmmio, lpck, uFlags) | |||
HMMIO hmmio; | |||
LPMMCKINFO lpck; | |||
UINT uFlags; |
The mmioAscend function ascends out of a chunk in a RIFF file descended into with mmioDescend or created with mmioCreateChunk.
hmmio
Specifies the file handle of an open RIFF file.
lpck
Specifies a pointer to a caller-supplied MMCKINFO structure previously filled by mmioDescend or mmioCreateChunk.
uFlags
Is not used and should be set to zero.
The return value is zero if the function is successful. Otherwise, the return value specifies an error code. The error code can be one of the following codes:
Value | Meaning |
MMIOERR_CANNOTWRITE | The contents of the buffer could not be written to disk. |
MMIOERR_CANNOTSEEK | There was an error while seeking to the end of the chunk. |
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, or if the MMIO_DIRTY flag is set in the dwFlags field of the MMCKINFO structure referenced by lpck, then the current file position is assumed to be the end of the data portion of the chunk. If the chunk size is not the same as the value stored in the cksize field when mmioCreateChunk was called, then mmioAscend corrects the chunk size in the file before ascending from the chunk. If the chunk size is odd, mmioAscend 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).
mmioDescend, mmioCreateChunk