mmioCFCopy copies the CTOC and CGRP chunks of an open source RIFF compound file to the target file. Deleted elements are not copied to the new file. mmioCFCopy opens the target file (using mmioOpen with the MMIO_CREATE flag) and builds a RIFF BND header at the beginning of the file. The CTOC and CGRP chunks then are copied. Notice that it is invalid to copy the RIFF compound file to itself. Upon completion of the copy operation, the target file is closed and resides on the file system, while the source file is unaltered. The target file must not be opened before mmioCFCopy is called.

As a note for performance considerations, the function either copies the entire CTOC and CGRP chunks in one single system buffer, or does a fixed page-size copy. The method used depends on the size of the RIFF compound file and is determined by the system. If the copy operation fails, the target file is deleted.

If the target already exists, it is overwritten by the copy operation.


[Back] [Next]