GetArxPath

extern HINSTANCE _hdllInstance;
CString GetArxPath()
{
CString strArxPath;
GetModuleFileName(_hdllInstance, strArxPath.GetBuffer(255), 255);
strArxPath.ReleaseBuffer();
// char *ch = strArxPath.GetBuffer(sizeof(strArxPath));
TCHAR dir[_MAX_DIR], drive[_MAX_DRIVE], path[_MAX_PATH], fileName[_MAX_FNAME];
_wsplitpath(strArxPath, drive, dir, fileName, NULL);
// _splitpath(strArxPath, drive, dir, fileName, NULL);

CString strPath; //获取路径名
strPath.Format(_T("%s%s"), drive, dir);

return strPath;
}

posted @ 2016-04-18 17:15  xzh1993  阅读(239)  评论(0编辑  收藏  举报