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"); TCH
用户评论