C++获取系统环境变量
作者:网络转载 发布时间:[ 2015/2/6 14:04:28 ] 推荐标签:C++ 环境变量
TCHAR szOutBuf[MAX_PATH] = {0};
GetEnvironmentVariable( _T("ProgramFiles"), szOutBuf, MAX_PATH - 1 );
TCHAR szOutBuf2[MAX_PATH] = {0};
GetEnvironmentVariable( _T("ProgramFiles(x86)"), szOutBuf2, MAX_PATH - 1 );
TCHAR szSourcePath[MAX_PATH] = _T("%ProgramFiles%\Tencent\QQBrowser");
TCHAR szDestPath[MAX_PATH] = {0};
ExpandEnvironmentStrings( szSourcePath, szDestPath, MAX_PATH - 1 );
TCHAR szSourcePath2[MAX_PATH] = _T("%ProgramFiles(x86)%\Tencent\QQBrowser");
TCHAR szDestPath2[MAX_PATH] = {0};
ExpandEnvironmentStrings( szSourcePath2, szDestPath2, MAX_PATH - 1 );
TCHAR szSourcePath3[MAX_PATH] = _T("%ProgramW6432%\Tencent\QQBrowser");
TCHAR szDestPath3[MAX_PATH] = {0};
ExpandEnvironmentStrings( szSourcePath3, szDestPath3, MAX_PATH - 1 );
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11