Resources | Resources |



Multimedia content file examples

The examples show how to access unlocked and locked MCF content.

Accessing a file in an unlocked MCF directory

The following example shows how to open an MCF file in an unlocked directory using IFileSytem2 and IFilePort1.

IFilePort1 * pIFilePort1 = NULL;
IFileSystem2 * pIFileSystem2 = NULL;
int nErr;

nErr = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_FileSystem2,
         (void **)&pIFileSystem2));

nErr = IFileSystem2_Open(pIFileSystem2, AEEFS_MCF_MUSIC_DIR "myMusic.mp3", 
         FS_CAP_CREATE  FS_CAP_RDONLY, &pIFilePort1 );

Accessing files in locked MCF directories

To access a file in a locked MCF directory, an application needs to have the appropriate file privilege and needs to belong to the appropriate MCF group, both of which are specified in the application's CIF in the Applet primitive.

In this example, the AEEPRIVID_PLFILE file privilege and the AEEGROUPID_MCF_MUSIC CF group are included in the privs field of the Applet primitive:

include ""
-- Include Directory = C:\Temp\testapp
AEEPRIVID_PLFile = 0x0001 –Declare
Applet { 
     appletid      = AEECLSID_testapp,
     resbaseid     = 20,
     applethostid  =  0,
     type          =  0,

ModRsc {
     name  = "IDS_STRING_20", 
     id    = 20,
     type  = 1,
     data  = EncStringRscData(0xFF, "testapp"),

For more information on MCF, see