Are the FindFirstFile() and FindNextFile() functions the best way to obtain a directory listing?
Are the FindFirstFile() and FindNextFile() functions the best way to obtain a directory listing?
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
Yes. I have a tutorial on their use if you need one. Here.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
One solution is to determine the file attribute and process only folders.
if (dataList.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
}
Kuphryn
I have a problem with Search Companion in Windows XP professional. When I am not logged onto the internet, and I try to use the Search Companion in any way, such as pressing Start-F or Ctrl-F, it tells me "a file is missing that is required to run Search Companion. Run setup". Basically, when I'm not on the net, I can't search for files at all, which is annoying. If I were to create a search program using FindFirstFile() and FindNextFile(), would that be the most efficient way? Also, if anyone knows how to fix the Search Companion problem, I'd love to know how.
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
Can you not put your XP cd in and choose the "Repair" option to put back the file, (I can't quite remember what the option is called, it is something like that, I remember seeing it when I reinstalled last time).
I would use FindFirstFile()/FindNextFile() to search or list files.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
I couldn't find that option on the CD. Are you sure it's possible? If not I guess I'll either reinstall or make my own search program.
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
Don't worry, I found an MSDN article that explained the error. Some files can become corrupted or become "missing", if you use search companion with some internet service providers. To fix it, you need to find the srchasst.inf file in the windows\inf\ folder. Right click and press install, and it's done (requires CD). Handy thing, MSDN. Though I wonder if there IS a repair function somewhere. That would be even more handy. Thanks for the help.
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials