Adding an Element to the CGRP Chunk

Use mmioCFAddElement to add an element to the CGRP chunk of an open RIFF compound file. The mmioCFAddElement function requires:

The CTOC entry for the element does not have to exist before you call mmioCFAddElement. If the CTOC entry exists, mmioCFChangeEntry modifies its contents. If the CTOC entry does not exist, mmioCFAddEntry is called to add the CTOC entry for this element. The mmioCFAddElement function writes the element to the end of the CGRP chunk. The user's buffer contains the element data.

The CGRP chunk may precede the CTOC chunk and overwrite the CTOC on the file system. This is corrected when the RIFF compound file is closed and the CTOC is rewritten.

Note: You can also add an element to the CGRP chunk by specifying MMIO_CREATE using the mmioOpen function.


[Back: Deleting a CTOC Entry]
[Next: Copying CTOC and CGRP Chunks]