This function will either construct a compound-file table of contents (CTOC) in memory for this compound file or give the caller access to a CTOC that already exists in memory for this compound file. Only one CTOC for a particular compound file is maintained in memory at any given time. This CTOC is shared by any process that needs access to the file.

This function will determine if the CTOC for this compound file is being maintained in memory. If so, the access and sharing modes are checked to ensure that an open operation is allowed. The existing handle (HMMCF) for the CTOC is returned to the caller. If the file had not been previously opened, this function will construct a CTOC in memory for this file. If the name is not pointing to a valid BND file, an error is returned.

The RIFF compound-file name cannot contain a + or | because they are used to express elements of compound files.

The access and sharing flags are maintained only within the set of compound-file functions. If the RIFF compound file or elements are accessed without using the compound-file calls, the access and sharing modes are unpredictable. An mmioOpen operation with a fully qualified element name is considered a compound-file call, because it internally calls mmioCFOpen; thus the flags are predictable in that case.

Access and sharing modes are supported for compound files. However, these modes are enforced only within the MMIO services compound-file functions and the mmioOpen of compound-file elements. The sharing modes work as in the base operating system except that elements ignore the sharing mode of the RIFF compound file. Elements do obey the access modes of the RIFF compound file.

Elements can be opened and used from the compound file by sending the element name that is stored in the CTOC to the mmioOpen function.

The FOURCC of FOURCC_BND should be used only for the element and not the compound file itself. That is, do not specify FOURCC_BND when using mmioCFOpen.


[Back] [Next]