×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jul 2005
    Location
    italy
    Posts
    72

    Tryng to launch an app via code on 3rd edition

    Hi all,

    I've compiled a little program that simply try to launch another app on symbian 9.1 (both programs have capability: NONE)... The code i'm using is something like:

    Code:
        TThreadId id;
        RApaLsSession ls;
        User::LeaveIfError(ls.Connect());
        CleanupClosePushL(ls);
        _LIT(KLitSwfFileToLaunch, "\\sys\\bin\\FLCustomVideoPlayer.exe");
        TFileName fileName(KLitSwfFileToLaunch);
        CompleteWithAppPath(fileName);
        User::LeaveIfError(ls.StartDocument(fileName,id));
        CleanupStack::PopAndDestroy(); //ls
    but i'm always giving the error: "Unable to execute file for security reasons"

    Do I have to give to "launcher" app a specific capability to run binary in sys folder?

    thanks in advance
    Leonardo

    ps. Console apps need the capability too?
    [url]http://www.leonardorisuleo.info/blog/[/url]

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Tryng to launch an app via code on 3rd edition

    Just use RProcess to start the application.

    You do not have read list or write access to \sys\bin

  3. #3
    Registered User
    Join Date
    Jul 2005
    Location
    italy
    Posts
    72

    Re: Tryng to launch an app via code on 3rd edition

    hi Paul,

    thanks for your reply!
    Using RProcess seems the right way:

    Code:
            _LIT(KMyAppName, "FLCustomVideoPlayer.exe");
    	RProcess EXE;
    	int result = EXE.Create( KMyAppName, KNullDesC);	
    	if (result!=KErrNone) Exit();
    	EXE.Resume();
    	EXE.Close();
    Leonardo
    [url]http://www.leonardorisuleo.info/blog/[/url]

  4. #4
    Registered User
    Join Date
    Jul 2005
    Location
    italy
    Posts
    72

    Re: Tryng to launch an app via code on 3rd edition

    Hi,

    thanks to your help i'm able to launch my app from a console application... now i've the necessity of passing to the app some parameters. Tryng:

    Code:
    EXE.SetParameter(0, KParams);
    crash my app, and if i try:

    Code:
    EXE.SetParameter(1, KParams);
    nothing happens (process does not start at all).

    Can you help me on this, please?
    Leonardo
    [url]http://www.leonardorisuleo.info/blog/[/url]

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Tryng to launch an app via code on 3rd edition

    Sorry, I just do not know how to pass parameters with SetParam. However if your FLCustomVideoPlayer.exe is a GUI app, you can use
    Code:
    CApaCommandLine *cmd=CApaCommandLine::NewLC();
    cmd->SetCommandL(EApaCommandRun);
    cmd->SetExecutableNameL(_L("FLCustomVideoPlayer.exe"));
    cmd->SetTailEndL(_L8("Some Parameter"));
    RApaLsSession als;
    User::LeaveIfError(als.Connect());
    CleanupClosePushL(als);
    User::LeaveIfError(als.StartApp(*cmd));
    CleanupStack::PopAndDestroy(2);
    to pass "Some Parameter" to it (you can also check what other fields CApaCommandLine has - e.g. Document, etc.), and it will get the CApaCommandLine in AppUi::ProcessCommandParametersL (you can use - overload - only the 1- and 3-parameters form, since the 2-params method is not virtual).

  6. #6
    Registered User
    Join Date
    Jul 2005
    Location
    italy
    Posts
    72

    Re: Tryng to launch an app via code on 3rd edition

    Hi wizard_hu_

    thanks a lot, it worked fine!

    [url]http://www.leonardorisuleo.info/blog/[/url]

Similar Threads

  1. How to launch Browser in 3rd Edition
    By S.S.Sudhakar in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2010-03-11, 09:39
  2. S60 3rd edition, WSDL, WebServices anyone?
    By myohol in forum Symbian Tools & SDKs
    Replies: 21
    Last Post: 2007-06-25, 09:57
  3. symbian signed testing problem.
    By anglina in forum Symbian
    Replies: 0
    Last Post: 2007-02-01, 10:15
  4. Replies: 3
    Last Post: 2006-11-09, 05:36
  5. Replies: 0
    Last Post: 2006-07-26, 03:49

Posting Permissions

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