Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2007

    Mimicing EikStart::RunApplication() on S60 2nd

    Hello all.

    I'm working on porting my VoIP application from S60 3rd to S60 2nd (yes, 9.1 -> 8.1). I faced a problem starting GUI applications from EXE because there's no EikStart::RunApplication() method implemented in eikcore.dll on S60 2nd. I cannot use ordinary APP/DLL model because my application is heavily loaded with static and global data (I use 3rd party Speex codecs and some other C libraries which were not adopted to S60 and I cannot fix it so I have to live with that).

    My question is how does S60 2nd start GUI ? i.e. what is the proper algorithm inside eikcore.dll which implements UI framework for starting applications ? I was experimenting alot and came to the following startup code which is only half the way to my goal .

    GLDEF_C int ExeMainL()
    CEikonEnv *coe = CEikonEnv::Static();

    coe->RootWin().SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);

    RFs r;

    CEikProcess *p = (CEikProcess*)CApaProcess::NewL(r);

    CEikDocument *doc = (CEikDocument*) p->AddNewDocumentL(NewApplication);

    CEikAppUi *ui = doc->CreateAppUiL();


    // .. something else must be initialized here befoe calling ConstructL()



    return KErrNone;

    GLDEF_C TInt E32Main()

    CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack

    CEikonEnv* coe = new CEikonEnv;

    TRAPD(err, coe->ConstructL());
    __ASSERT_ALWAYS(!err, User::Panic(_L("CUSTOM1"), err));

    TRAPD(err3, ExeMainL());


    delete cleanup;

    return KErrNone;

    This code uses CEikDocument::AddNewDocumentL(NewApplication) to construct the document, and it seems it is working. The problem here is that when I call ui->ConstructL() second stage constructor to construct my application document, it fails right after calling into BaseConstructL() (inside the app itself) with Panic 3 which means some uninitialized pointer was used.

    Has someone any ideas on how to:
    1. run GUI apps on S60 2nd like EikStart::RunApplication() does it on 3rd from exe?
    2. Or how to mimic EikStart::RunApplication() on S60 2nd ?
    3. Or what I have forgotten to initilize in my custom starter code ?
    4. Or is there any place on the net where I can download a source code for eikcore.dll from ? ;-)

    I will be very thankful, I spent last two weeks fighting this problem without any luck, I believe you know what my feelings are now .

    Best regards,
    Last edited by ruslan.zalata; 2007-11-13 at 23:11. Reason: fixed typos

  2. #2
    Registered User
    Join Date
    Apr 2005

    Re: Mimicing EikStart::RunApplication() on S60 2nd

    I wouldn't go the 'emulate ui app' way, as it can bring you some compatibility problems among versions. Have you read the existing docs about (porting) strategies to deal with global vars? They might give you some ideas..

    Some examples:


  3. #3
    Registered User
    Join Date
    Nov 2007

    Re: Mimicing EikStart::RunApplication() on S60 2nd

    Hi again.

    Thank you for your recommendation, but.. Of cource I have studied all the alternative possibilities. Unfortunetly I cannot wrap around all the static data since they are not mine and are spread all over the C libraries I use (I simply cannot rewrite them). EPOCALLOWDLLDATA is also not working to me since I'm porting to EKA1. So, EXE is the only way to go.

    I have tried some examples (ExeCtrl, etc) and I can see that it is really possible to create GUI environment manually. Anybody knows how to do that ?

    I also saw a reference to some article on how to install GUI app into same process of EXE, but the article itself was removed. Does someone has a working link ?


Similar Threads

  1. Carbide c++ Express and S60 2nd, FP3
    By Slowmo in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2007-01-17, 17:11
  2. modify Hello World S60 2nd FP2
    By puh_sk8@hotmail.com in forum Symbian
    Replies: 2
    Last Post: 2007-01-05, 10:46
  3. s60 2nd Edition fp3 Compile Problem
    By pavan in forum Symbian
    Replies: 1
    Last Post: 2006-11-18, 15:23
  4. RVCT and S60 2nd SDKs
    By Rafael Saracchini in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2006-11-10, 11:51
  5. S60 2nd OR 3rd edition for new software development
    By patil_ruturaj in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-06-30, 09:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts