读书人

WinCE中怎么获得当前运行程序的文件路

发布时间: 2012-05-15 14:35:29 作者: rapoo

WinCE中如何获得当前运行程序的文件路径?
WinCE中如何获得当前运行程序的文件路径?

[解决办法]
void GetCurrentDirectory(CString &strPath)
{
wchar_t pBuf[256];

GetModuleFileName(NULL,pBuf,sizeof(pBuf)/sizeof(wchar_t));
strPath=pBuf;
strPath = strPath.Left(strPath.ReverseFind('\\') + 1);
}

读书人网 >Windows Mobile

热点推荐