GetModuleFilePath()

作者在 2009-04-21 12:48:38 发布以下内容
CString CServices::GetModuleFilePath()
{
 TCHAR szFile[255]={0};
 CString str = _T("");
 DWORD dwRet = GetModuleFileName(NULL,szFile,255);
 if(dwRet!=0)
 {  
  str = _T(szFile);
  int nPos = str.ReverseFind('\\');
  if(nPos!=-1)
  {
   str = str.Left(nPos+1);
  }
 }
 return str;
}

 
默认分类 | 阅读 11131 次
文章评论,共0条
游客请输入验证码
浏览50632次
文章分类
最新评论