The purpose of this document is to help migrate polymorphic DLLs to plug-ins as applications.
Different control panel plug-ins are likely to need different capabilities in order to change the phone's configuration. Rather than each plug-in running in a parent process with a dangerously large set of capabilities, each plug-in should run in its own process, so that each can have the minimal set of capabilities that it requires. For this reason, the decision was made to convert all existing control panel plug-ins, which are implemented as polymorphic DLLs, into standard applications, but with a special registration file. This registration file is used by the application server to distinguish the plug-in from a normal application.
The control panel application must be located in \sys\bin\<appname.exe>. Only executables (EXEs and DLLs) must exist in \sys\bin\.
The control panel application's UI resource file must be located in \Resource\apps\<appname.rsc>.
There must be a registration resource file for each control panel application in
\private\10003a3f\apps\ if it is either on the emulator or built into the ROM, or
\private\10003a3f\import\apps\ if it is installed using SWI.
Each existing control panel plug-in has only one exported function, which is called by default. To convert the plug-in into an application, the four classes which are required components of any application must be provided, for example:
class CExampleAppView : public CCoeControl
class CExampleAppUi : public CEikAppUi
class CExampleDocument : public CEikDocument
class CExampleApplication : public CEikApplication
Note: that each System GUI provides its own application, app UI and document base classes.
The executable's entry points need to be modified as follows:
LOCAL_C CApaApplication* NewApplication() { return new CExampleApplication; } GLDEF_C TInt E32Main() { return EikStart::RunApplication(NewApplication); } #if defined(__WINS__) && !defined(EKA2) GLDEF_C TInt E32Dll(TDllReason) { return KErrNone; } EXPORT_C TInt WinsMain(TDesC* aCmdLine) { return EikStart::RunApplication(NewApplication, aCmdLine); } #endif
For details on converting existing control panel plug-ins into applications, refer to the migration document: Porting apps to exes.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.