FindFirstfile parameter...
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, I would like to search for file *.abc & *.xyz in a folder. For this what should be the first parameter( LPCTSTR lpFileName) in FindFirstFile() ? Thanks Neha
Do you mean that you want to find "*.abc" OR "*.xyz" in a folder? If so, I think you need two FindFirstFile() calls. HANDLE h1 = FindFirstFile( "*.abc", &filedata1 ); HANDLE h1 = FindFirstFile( "*.xyz", &filedata2 ); You have a match when, if (( h1 != INVALID_HANDLE_VALUE ) || ( h2 != INVALID_HANDLE_VALUE )) { .....Process h1 .....Process h2 } Joe M