News for hackers. Stuff that matters.
Re:Fibers: An Elegant Windows API by asveikau on Friday March 29, 2019 @06:48PM (#19526302)
You are correct. The actual pattern you want to use in practice with this API is more of a do ... while:

    WIN32_FIND_DATA data;
    HANDLE handle;

    handle = FindFirstFile(str, &data);
    // TODO - error check

    do
    {
        // TODO: process "data" which is a file.
    } while (FindNextFile(handle, &data));

    FindClose(handle);
So the loop body is the same for the "first" and "next" files.

There are no comments on this comment yet.