void CopyDmp::EnumLogFile(const std::wstring & cstrPath, std::vector<std::wstring> & vecFiles)
{
HANDLE hFindFile = INVALID_HANDLE_VALUE;
WIN32_FIND_DATA struFindFileData;
hFindFile=FindFirstFile( (cstrPath + L"\\*.dmp").c_str(), &struFindFileData );
if (hFindFile == INVALID_HANDLE_VALUE )
{
return ;
}
do
{
if ( !_tcscmp( struFindFileData.cFileName, _T( "." ) ) || !_tcscmp( struFindFileData.cFileName, _T( ".." ) ))
{
continue;
}
if ( 0 != (struFindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) )
{
;
}
else
{
if(wcsstr(struFindFileData.cFileName, L".dmp"))
{
vecFiles.push_back(cstrPath + L"\\" + struFindFileData.cFileName) ;
}
}
} while ( FindNextFile( hFindFile, &struFindFileData ) );
}