Creating an Implementation Project File

An implementation project file is a .mmp file, which specifies the essential elements of the implementation. The project files are used for project development. The implementation project file contains information (source file, build file) about the implementation that is being built.The format of implementation project file is dependent on the version of the Symbian platform used. The differences basically reflect the introduction of platform security into Symbian OS v9.0 and later versions.

Steps

  • For creating a plug-in project file for Symbian OS v9.1 and later:

    1. Set TARGET to the standard DLL name. TARGET contains the final binary name of the project generated. The plug-in DLL file is stored along other binaries in the\Sys\Bin directory. The plug-in framework does not discover plug-ins installed in the pre v9.1 location, \System\Libs\Plugins.
    2. Set TARGETTYPE to PLUGIN. TARGETTYPE specifies the type of binary. Set TARGETTYPE to PLUGIN3 for DLLs supporting the extension interfaces. PLUGIN3 DLLs are given the UID2 value of 0x10009D93.
    3. Set UID to plug-in framework DLL recognition UID followed by the unique UID of the plug-in. UID of the plug-in must be the same as the one specified in the dll_uid member in the registration resource file.
    4. Set VENDORID to the vendor creating the plug-ins.
    5. Set CAPABILITY to the capabilities of the plug-in in the variable. If the plug-in is assigned no capabilities, only client processes with no capabilities can use them. For more information, see ECom and the Platform Security Architecture.
    6. Set SOURCEPATH to the path where the source files exist. The path set in this variable must be relative to the path of the project file.
    7. Set SOURCE to the name of the source file.
    8. Set USERINCLUDE to the path where the user provided header files are available. The path set in this variable must be relative to the path of the project file.
    9. Set SYSTEMINCLUDE to\epoc32\include\ecom. SYSTEMINCLUDE specifies the path to OS provided header files.
    10. Set RESOURCE to the registration resource file of the implementation. From v9.1, the name of the registration resource file must be the same as that of the executable. For example, if the plug-in is foo.dll, then its registration resource file must be called foo.rsc. This is because plug-in framework uses the names of the registration resource file to find the plug-in DLLs. A simple START RESOURCE statement is of the following form:

      Example:

      START RESOURCE foo.rss
      END
      This builds a file named foo.rsc. Registration resource files are always built into the target directory \Resource\Plugins. There is no need to explicitly set the target directory for the .rsc file in the project file, the build tools take care of it. Where the registration resource source file is still named after the UID of the DLL, the built resource file can be renamed to be the same as the DLL, using the TARGET keyword. For example:

      Example:

      START RESOURCE 10009DB0.rss
      TARGET foo.rsc
      END
      This builds the 10009DB0.rss source file into \Resource\Plugins\foo.rsc.
    11. Set the variable LIBRARY to ecom.lib. The binary links against the specified .lib file.
  • For creating a plug-in project file for Symbian OS v9.0 and earlier:

    1. Set TARGET to the standard DLL name. TARGET contains the final binary name of the project generated.
    2. Set TARGETTYPE as ECOMIIC. TARGETTYPE specifies the type of binary.
    3. Set UID to the plug-in framework DLL recognition UID followed by the unique UID of the plug-in. Unique UID of the plug-in must be the same as the one specified in the dll_uid member in the registration resource file.
    4. Set SOURCEPATH to the path where the source files exist. The path set for this variable must be relative to the path of the project file.
    5. Set SOURCE to the name of the source file.
    6. Set USERINCLUDE to the path where the user provided header files are available. The path set in this variable must be relative to the path of the project file.
    7. Set SYSTEMINCLUDE to\epoc32\include\ecom. SYSTEMINCLUDE specifies the path to OS provided header files.
    8. Set RESOURCE to the registration resource file of the implementation. The registration resource file .rss need not have the same name as the DLL. It is required to be named after the UID of the DLL.
    9. Set LIBRARY to ecom.lib. The binary links to the .lib file.

Creating an implementation project file example

For Symbian OS v9.1 and later

// ExampleInterfaceImplementation.mmp
//
TARGET     ExampleInterfaceImplementation.dll
TARGETTYPE PLUGIN

// ECom Dll recognition UID followed by the unique dll UID 
UID 0x10009D8D 0x10009DB0

VENDORID 0x70000001

CAPABILITY All -TCB

SOURCEPATH \ExampleInterfaceImplementation
SOURCE     ExampleInterfaceImplementation.cpp

USERINCLUDE  \ExampleInterfaceImplementation \inc
SYSTEMINCLUDE  \epoc32\include
SYSTEMINCLUDE  \epoc32\include\ecom

START RESOURCE 10009DB0.rss
TARGET            ExampleInterfaceImplementation.rsc
END

LIBRARY euser.lib
LIBRARY ecom.lib

For Symbian OS v9.0 and earlier

// ExampleInterfaceImplementation.mmp
//
TARGET ExampleInterfaceImplementation.dll
TARGETTYPE ECOMIIC

// ECom Dll recognition UID followed by the unique dll UID 
UID 0x10009D8D 0x10009DB0

SOURCEPATH \ExampleInterfaceImplementation
SOURCE ExampleInterfaceImplementation.cpp

USERINCLUDE  \ExampleInterfaceImplementation \inc
SYSTEMINCLUDE  \epoc32\include
SYSTEMINCLUDE  \epoc32\include\ecom

RESOURCE 10009DB0.rss

LIBRARY euser.lib
LIBRARY ecom.lib