FindFirstFile and FindNextFile

Hotice (135)
Let's say you have the following declarations:
1
2
HANDLE h;
WIN32_FIND_DATA fd;

and you set h = FindFirstFile((dir+"/*.").c_str(), &fd);
If you were to use
1
2
3
4
while ((((string)fd.cFileName == ".") || ((string)fd.cFileName == "..")) && (FindNextFile(h,&fd)))
{
 //Do nothing because FindNextFile is changing fd.cFileName
} //end while 

will FindNextFile(h,&fd) change h?
In other words, would
FindNextFile(FindFirstFile((dir+"/*.").c_str(), &fd), &fd) mean the same as FindNextFile(h, &fd)?
Last edited on
Lamblion (642)
I'm not perfectly sure what you are asking with your last example, but h is the handle to the file, and FindNextFile() doesn't alter the handle.
Hotice (135)
That was what I was asking.
Registered users can post here. Sign in or register to post.