- //获得模块路径
- CString sysop::SysPath()
- {
- TCHAR tchBuffer[500];
- LPTSTR pBuffer = tchBuffer;
- ::GetModuleFileName(0,pBuffer,500);
- CString path = pBuffer;
- int n_ini = path.ReverseFind('\\\\');
- path = path.Left(n_ini);
- return path;
- }
- //该片段来自于http://www.codesnippet.cn/detail/230520133524.html
来源: http://www.codesnippet.cn/detail/230520133524.html