Copying CTOC and CGRP Chunks

Use the mmioCFCopy function to copy the CTOC and CGRP chunks from an open RIFF compound file to another RIFF compound file. The mmioCFCopy function requires a pszDestFileName parameter, which identifies the pointer to the name of the destination file.

The mmioCFCopy function opens the destination file for MMIO_CREATE (using mmioOpen) and builds a RIFF BND header at the beginning of the file. The CTOC and CGRP chunks are then copied. The newly written CGRP chunk is compacted; it has no deleted elements.


[Back: Adding an Element to the CGRP Chunk]
[Next: Compacting RIFF Compound Files]