[转]VC中常用文件功能函数收集
2007-12-26 10:30
344 查看
获取当前路径
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
void GetCurrentDir( char * pPathName )
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
......{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char PathName[MAX_PATH];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char *p = NULL;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
GetModuleFileName( NULL , PathName , MAX_PATH);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// (strrchr(filename,''))[1] = 0 ;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
p = strrch(PathName,'');
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// filename[strlen(filename)-1] = 0;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
strncpy(pPathName, PathName, p-PathName);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pPathName[p-PathName] = 0;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
return ;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
void GetCurrentDir( char * pPathName )
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
......{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char PathName[MAX_PATH];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
char *p = NULL;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
GetModuleFileName( NULL , PathName , MAX_PATH);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// (strrchr(filename,''))[1] = 0 ;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
p = strrch(PathName,'');
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// filename[strlen(filename)-1] = 0;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
strncpy(pPathName, PathName, p-PathName);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
pPathName[p-PathName] = 0;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
return ;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
}
相关文章推荐
- [转]VC中常用文件功能函数收集
- php常用功能函数收集
- ThinkPHP中Common/common.php文件常用函数功能分析
- VC++常用功能函数集锦1
- 常用文件操作功能函数
- VC常用函数收集
- VC中使用低级音频函数WaveX播放声音文件
- matlab常用函数及功能
- 编写一个类,该类具有统计文件长度,实现文件复制的函数。 其中复制功能函数如: void copy(string srcFileName,string targetFileName);
- php读取本地文件常用函数(fopen与file_get_contents)
- sublime Text 3实用功能和常用快捷键收集
- 汇总c#.net常用函数和方法集 (网络收集)
- asp+XMLHTTP组件做采集常用函数收集
- DOM常用功能及常用函数介绍
- VC里的Application.ProcessMessage()功能类似的函数
- vc MFC使用OPenCV常用函数搜集
- μC/OS-Ⅱ下的九个C语言文件功能函数大全
- PHP常用文件操作函数
- javascript常用方法函数收集
- C++常用的文件操作路径函数