mmioAscend

The mmioAscend function ascends out of a chunk in a RIFF file descended into with the mmioDescend function or created with the mmioCreateChunk function.

MMRESULT mmioAscend(
  HMMIO hmmio,      
  LPMMCKINFO lpck,  
  UINT wFlags       
);
 

Parameters

hmmio
File handle of an open RIFF file.
lpck
Address of an application-defined MMCKINFO structure previously filled by the mmioDescend or mmioCreateChunk function.
wFlags
Reserved; must be zero.

Return Values

Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following:

Value Description
MMIOERR_CANNOTSEEK There was an error while seeking to the end of the chunk.
MMIOERR_CANNOTWRITE The contents of the buffer could not be written to disk.

Remarks

If the chunk was descended into by using mmioDescend, 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 by using mmioCreateChunk, or if the MMIO_DIRTY flag is set in the dwFlags member of the MMCKINFO structure referenced by lpck, 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 member of the MMCKINFO structure when mmioCreateChunk was called, 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).

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, mmioDescend, mmioCreateChunk, MMCKINFO