Is it possible to use Windows API function FindFirstFile to search for multiple file types, e.g *.txt and *.doc at the same time?
I tried to separate patterns with '\0' but it does not work – it searches only the first pattern (I guess, that’s because it thinks that '\0' is the end of string).
Of course, I can call FindFirstFile with *.* pattern and then check my patterns or call it for every pattern, but I don’t like this idea – I will use it only if there no other solutions.
This is not supported. Run it twice with different wildcards. Or use
*.*and filter the result. This is definitely the better choice, wildcards are ambiguous anyway due to support for legacy MS-DOS 8.3 filenames. A wildcard like *.doc will find both .doc and .docx files for example. A filename likelongfilename.docxalso creates an entry namedLONGFI~1.DOC