posts - 126,  comments - 73,  trackbacks - 0

.GetModuleFileName()

 char path[255];
 GetModuleFileName(AfxGetInstanceHandle(),   path,   MAX_PATH-1);

 

. _getcwd

#include <direct.h>

char path[255];
 _getcwd(path,255);

.GetCommandLine

#include "Shlwapi.h"
 LPSTR path = ::GetCommandLine(); 

PathRemoveArgs(path);   //Path.RemoveArgs();
 PathUnquoteSpaces(path);  //Path.UnquoteSpaces();
 PathRemoveFileSpec(path);  //Path.RemoveFileSpec();
 PathAppend(path,"test.ini");

 

posted on 2007-05-29 11:57 我风 阅读(2750) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2007年5月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

常用链接

留言簿(12)

随笔分类

随笔档案

文章档案

相册

收藏夹

C++

MyFavorite

搜索

  •  

积分与排名

  • 积分 - 319875
  • 排名 - 74

最新评论

阅读排行榜

评论排行榜