1.获得当前应用程序的执行目录,并由止目录形成临时配置文件
CString cTemp;
char FileName[MAX_PATH];
::GetModuleFileName(NULL,FileName,MAX_PATH);
char drive[_MAX_DRIVE];
char dir[_MAX_DIR];
_splitpath(FileName,drive,dir,NULL,NULL);
//设置当前目录
_makepath(FileName,drive,dir,NULL,NULL);
SetCurrentDirectory(FileName);
//sprintf(FileName,"SetUp.INI");
_makepath(FileName,drive,dir,"setup",".INI");
阅读(874) | 评论(0) | 转发(0) |