Searching for a file using FindFirstFile() ?
I know salem has discussed this before, but I am using LCC-Win32 at the moment and need to find out how to search the entire hard drive for sol.exe (solitare).
Here's a snippit of code that works with my compiler:
Code:
int findSolitaire(void)
{
WIN32_FIND_DATA solitaire;
FindFirstFile("sol.exe",&solitaire);
MessageBox(NULL,solitaire.cFileName,solitaire.cFileName,0);
return 0;
}
This only works if solitaire is in THE SAME DIRECTORY as the running program. Please post an example of one that searches the entire hard drive.
PS: chdir() doesn't work in my compiler (LCC is C-Only, so C++ functions don't work)