此帖出自WindowsCE论坛
最新回复
void BrowerFile(LPCTSTR lpDir) //遍历文件
{
HANDLE hFind;
WIN32_FIND_DATAW wfd;
TCHAR tchPath[MaxPath] = {0};
TCHAR tchDir[MaxPath] = {0};
TCHAR tchStr[] = _T("Setting.bat");
//*m_tchPath = 0;
lstrcat(tchPath,lpDir);
lstrcat(tchPath,_T("\\*.*"));
hFind = FindFirstFile(tchPath,&wfd);
if (hFind != INVALID_HANDLE_VALUE)
{
while (TRUE)
{
if(IsDirectory(wfd.cFileName))
{
*tchPath = 0;
lstrcat(tchPath,lpDir);
lstrcat(tchPath,_T("\\"));
lstrcat(tchPath,wfd.cFileName);
BrowerFile(tchPath);
}
if (Tcharcmp(wfd.cFileName,tchStr)) //Tcharcmp()判断是不是要找的文件
{
lstrcat(m_tchPath,lpDir); //保存文件路径
break;
}
if ( !FindNextFile(hFind,&wfd))
break;
}
FindClose(hFind);
}
}
HANDLE m_hFindTread;
};
勉强可以实现,给你作参考
详情
回复
发表于 2010-4-15 17:01
| ||
|
||
| |
|
|
| |
|
|
| |
|
|
此帖出自WindowsCE论坛
| ||
|
||
EEWorld Datasheet 技术支持