How To Get Application Path,And How To Get The Path's Directory,File Name,And Type Info(如何得到运行程序的路径,以及如何得到路径的文件夹,文件名,以及类型等等信息)
来源:互联网 发布:穿针引线软件下载 编辑:程序博客网 时间:2024/05/18 00:39
********************************************************************/
/* */
/* Function name : GetAppDir */
/* Description : Get application directory. */
/* */
/********************************************************************/
void GetAppDir(CString& strAppDir)
{
TCHAR szFullPath[MAX_PATH];
TCHAR szDir[_MAX_DIR];
TCHAR szDrive[_MAX_DRIVE];
/* */
/* Function name : GetAppDir */
/* Description : Get application directory. */
/* */
/********************************************************************/
void GetAppDir(CString& strAppDir)
{
TCHAR szFullPath[MAX_PATH];
TCHAR szDir[_MAX_DIR];
TCHAR szDrive[_MAX_DRIVE];
// Get application's full path.
::GetModuleFileName(NULL, szFullPath, MAX_PATH);
// Break full path into seperate components.
_splitpath(szFullPath, szDrive, szDir, NULL, NULL);
// Store application's drive and path
strAppDir.Format(_T("%s%s"), szDrive, szDir);
}
- How To Get Application Path,And How To Get The Path's Directory,File Name,And Type Info(如何得到运行程序的路径,以及如何得到路径的文件夹,文件名,以及类型等等信息)
- How to get the file's extend name in C++ - 在C++中如何获取文件的扩展名
- How to get the file's icon using C++ - 用C++如何获取文件的图标
- How to get camped network type name - Android应用如何获得Phone当前注册的网络类型
- How to Get App Name and Version
- How to get Version of the application and API version
- How to use script to get all oracle EBS Form name and corresponding fmb file name
- How to get file path in onActivityResult in Android 4.4
- 得到坐标的颜色值 How to get the color of a pixel in an UIView?
- How to Use Oradebug to Get Trace File Name and Location
- [PHP]How to get the system info?
- How to get service execuable path
- how to get current path in qt
- How to get local machine name and IP address?
- Magento: How to get controller, module, action and router name?
- How to get battery info
- Android LruCache : how to put and get user's data
- Use Flex and JavaScript to get the full path of a local File
- MSN Messenger聊天机器人颁奖典礼
- 如何在工具栏中,加上图标和文字?(How To Add Icon And Text)
- 如何嵌入(Docking)一个工具条(How To Docking A Toolbar)
- 如何分屏幕(How to split the Screen)
- 曲终人不散
- How To Get Application Path,And How To Get The Path's Directory,File Name,And Type Info(如何得到运行程序的路径,以及如何得到路径的文件夹,文件名,以及类型等等信息)
- Tomcat安装与瑞星2004
- 注册表
- JNDI简介&简单示例
- 《因父之名》
- 在 Linux 下使用优盘。
- C#截取屏幕↑
- 为Linux正名!
- Larry.Ellison在耶鲁大学2000届毕业典礼上的演讲