How To Get Application Path,And How To Get The Path"s Directory,File Name,And Type Info(如何得到运行程序的路径,以及如何得到路径
How To Get Application Path,And How To Get The Path"s Directory,File Name,And Type Info(如何得到运行程序的路径,以及如何得到路径 ********************************************************************/
/* */
/* Function name : GetAppDir */
/* Description : Get application directory. */
/* */
/********************************************************************/
void GetAppDir(CString& strAppDir)
{
TCHAR szFullPath[MAX_PATH];
TCHAR szDir[_MAX_DIR];
TCHAR szDrive[_MAX_DRIVE];
::GetModuleFileName(NULL, szFullPath, MAX_PATH);
_splitpath(szFullPath, szDrive, szDir, NULL, NULL);
strAppDir.Format(_T("%s%s"), szDrive, szDir);
}