Use the mmioCFClose function to close a RIFF compound file that was opened by mmioCFOpen. The mmioCFClose function writes the CTOC back to the RIFF compound file. You can also open an element using the mmioOpen function with the BND and element both specified on the open call (see to Opening or Creating a File). In that case, you would call the mmioClose function, which would close the element and RIFF compound file.
If the process ends, all open elements are closed and the CTOC is rewritten. If the compound file was opened for read only, the CTOC is not rewritten.
If the mmioCFClose fails and you modified CGRP elements, the data stored on the file is inconsistent. Attempt to correct the inconsistency by freeing file space and trying to close the file again.