Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User bytesm's Avatar
    Join Date
    Jul 2005
    Location
    italy
    Posts
    72
    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 Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    Just use RProcess to start the application.

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

  3. #3
    Registered User bytesm's Avatar
    Join Date
    Jul 2005
    Location
    italy
    Posts
    72
    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 bytesm's Avatar
    Join Date
    Jul 2005
    Location
    italy
    Posts
    72
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    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 bytesm's Avatar
    Join Date
    Jul 2005
    Location
    italy
    Posts
    72
    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 C++
    Replies: 0
    Last Post: 2007-02-01, 10:15
  4. Replies: 3
    Last Post: 2006-11-09, 05:36
  5. News:UCanCode Software Releases XD++ Professional Edition V8.60 (100% Source Code)!
    By jackonlyone in forum News, Announcements and Job Listings
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved