symbian中得到应用程序的路径

news/2024/7/10 3:53:57 标签: symbian, null, path, file

代码1:

void GetFullPathName(TDes& aFileName)
{
// Get default drive and path
TParse parse;
TFileName appPath;
TBuf<5> appDrive;
parse.Set(CEikonEnv::Static()->EikAppUi()->Application()->AppFullName(), NULL, NULL);
appPath.Copy(parse.DriveAndPath());
appDrive.Copy(parse.Drive());

// Parse the file name
parse.Set(aFileName, NULL, NULL);
if (parse.Drive().Length() == 0)
{
if (parse.Path().Length() == 0)
{ // Use default path and drive
aFileName.Insert(0, appPath);
}
else
{ // Use default drive
aFileName.Insert(0, appDrive);
}
}
}
 

代码2:

TFileName fullPath;
fullPath = iEikonEnv->EikAppUi()->Application()->AppFullName();
TParse parse;
parse.Set( fullPath,NULL,NULL );
fullPath.Copy( parse.DriveAndPath() );


http://www.niftyadmin.cn/n/1353776.html

相关文章

BCB编写DLL终极手册

一. 编写 DLLFile/New/Dll 生成 Dll 的向导&#xff0c;然后可以添加导出函数和导出类导出函数&#xff1a;extern "C" __declspec(dllexport) ExportType FunctionName(Parameter)导出类&#xff1a;class __declspec(dllexport) ExportType ClassName{...}例子&…

wow tbc dz 天赋

19/42/0 http://www.wowar.com/tools/wowar/info/talents/rogue.shtml?1053201250000000000003203050022055100203012510000000000000000000000 41、20、0 http://www.wowar.com/tools/wowar/info/talents/rogue.shtml?30530010504213250105130300520200500000000000000000…

Symbian 各种资源的定义

各种资源的定义一、最基本的定义格式 /* Copyright (c) 2002, Nokia. All rights reserved */NAME HELL  //资源的&#xff29;&#xff24;。在一个项目内保证无重复名称#include <eikon.rh> //必须的一些内部结构和常量的定义 #include <eikon.rsg> …

Symbian 中各种提示、输入对话框的使用

各种提示、输入对话框的使用1、非阻塞提示框symbian定义了几个提示类&#xff0c;分别是&#xff1a;confirm类&#xff1a;CAknConfirmationNoteinfo类&#xff1a; CAknInformationNotewarning类&#xff1a;CAknWarningNoteerror类&#xff1a; CAknErrorNote头文件&#xf…

symbian 如何检测编辑框的当前输入法类型

当我们进行全屏程序开发的时候&#xff0c;对编辑框中当前的输入法要时行判断&#xff0c;以方便我们在界面上贴图表现&#xff0c;通过下面的三步可以完成这个功能&#xff1a; 1、在.h文件中加入相关的头文件#include <eikenv.h> // for CAknEnv::Static()#include &…

通过MEikEdwinObserver监控CEikEdwin

CEikEdwin提供了SetEdwinObserver()和 AddEdwinObserverL()方法用来设置和添加标准编辑框CEikEdwin的观察器,通过派生并实现MEikEdwinObserver中的纯虚函数HandleEdwinEventL()就可以获得编辑框的一些标准事件,下面的代码展示了具体的实现方法: // INCLUDES#include <coecn…

P2P之UDP穿透NAT的原理与实现(附源代码)

P2P之UDP穿透NAT的原理与实现&#xff08;附源代码&#xff09; 作者&#xff1a;shootingstars | 日期&#xff1a;2004-05-25 | 字体&#xff1a;大 中 小 P2P 之 UDP穿透NAT的原理与实现&#xff08;附源代码&#xff09;原创&#xff1a;shootingstars参考&#xff1a;htt…

在Symbian程序中使用图标

Symbian中的图片主要两种&#xff1a;程序图标&#xff08;像Win里的桌面图标和程序左上角的图标&#xff09;&#xff0c;界面用到的图片&#xff08;各种美化用的图片&#xff09;。1.图标的使用利用PhotoShop&#xff0c;画图等图片编辑工具&#xff0c;分别制作24*24,32*32…