WEB开发网
开发学院手机开发Symbian 开发 在 Symbian C++ 代码中启动应用程序并携带参数的几... 阅读

在 Symbian C++ 代码中启动应用程序并携带参数的几种方式

 2010-03-26 21:20:00 来源:WEB开发网   
核心提示:1. StartApp 方式调用:CApaCommandLine *cmd=CApaCommandLine::NewLC();cmd->SetCommandL(EApaCommandRun);cmd->SetExecutableNameL(_L("HelloWorld.exe"));cm

1. StartApp 方式调用:

CApaCommandLine *cmd=CApaCommandLine::NewLC();

cmd->SetCommandL(EApaCommandRun);

cmd->SetExecutableNameL(_L("HelloWorld.exe"));

cmd->SetDocumentNameL(_L("x.txt"));

RApaLsSession als;

User::LeaveIfError(als.Connect());

CleanupClosePushL(als);

User::LeaveIfError(als.StartApp(*cmd));

CleanupStack::PopAndDestroy(2);

2. StartDocument

RApaLsSession als;

TThreadId id;

TUid uid;

uid.iUid = 0xE0001001;

als.Connect();

als.StartDocument(_L("yourdocument.txt"), uid, id);

als.Close();

3. PProcess

RProcess* process = new RProcess();

TUidType uidtype(KNullUid);

process->Create(_L("\sys\bin\HelloWorld.exe"), _L("param1"), uidtype);

process->Resume();

process->Close();

delete process;

浏览器0x10008D39;日历0x10005901;情景模式 0x100058F8;名片夹0x101F4CCE;待办事项0x10005900; 通讯记录0x101F4CD5;多媒体资料0x101F8599;信息0x100058C5;蓝牙0x10005951;录音器0x100058CA; 单位换算0x101F4668;计算器0x10005902;相机0x1000593F(2版)0x101f857A 0x101ffa86(3版)。

Tags:Symbian 代码 启动

编辑录入:coldstar [复制链接] [打 印]
赞助商链接