I know this is a terribly old thread, but I hope I can still pitch in and help. After a FindFirstFile, FindNextFile is usually called in a loop, but only if FindFirstFile does not return INVALID_HANDLE_VALUE. Once you are done, you will need to close the handle with FindClose.

When using FindFirstFile to search for directories, the first result is always ".", provided the search directory is valid. The very first call with FindNextFile is then "..". Everything else after that are directories you are interested in.