首页 > 编程语言 >vc-获取程序当前绝对路径

vc-获取程序当前绝对路径

时间:2022-11-08 10:35:53浏览次数:41  
标签:cspath vc return index CString 绝对路径 获取 fullpath


CString GetCurrPath()
{
char fullpath[256] = {0};
GetModuleFileName(NULL, fullpath, MAX_PATH);
CString cspath(fullpath);
int index = cspath.ReverseFind('\\');
return cspath.Left(index);
}


标签:cspath,vc,return,index,CString,绝对路径,获取,fullpath
From: https://blog.51cto.com/u_13316945/5831990

相关文章