This function decrements the usage count of the compound-file table of contents (CTOC) maintained in memory for this RIFF compound file. If the usage count drops to 0, the CTOC is written to disk, and the RIFF compound-file handle is closed. An mmioCFClose operation fails if there are any open elements for this RIFF compound file. The user will get an error if mmioClose is used instead of mmioCFClose when trying to close a RIFF compound file.
If this is an ExitList close, all open elements are closed, and the mmioCFClose operation is allowed. If the compound file was opened as read-only, the CTOC will not be rewritten.
If the mmioCFClose function fails and the user had modified compound-file-resource-group (CGRP) elements, the data stored on the file is inconsistent. To correct the problem, the user must create free file space and attempt to close again.