[API]
FILETIME
Public WIN32_FIND_DATA
FindFirstFileA
FindFirstFileW
FindNextFileA
FindNextFileW
Public FindClose

[INCLUDE]
PeekS

[CODE]
Public Function FindFirstFile(ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA, ByVal Attributes As VbFileAttribute) As Long
  lpFindFileData.dwFileAttributes = CLng(Attributes)
  If IsUnicode Then
    FindFirstFile = FindFirstFileW(StrPtr(lpFileName), lpFindFileData)
    Else
    FindFirstFile = FindFirstFileA(lpFileName, lpFindFileData)
    End If
  lpFindFileData.Filename = PeekS(VarPtr(lpFindFileData.Reserved_cFileName(0)), 260&)
  End Function

Public Function FindNextFile(ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
  If IsUnicode Then
    FindNextFile = FindNextFileW(hFindFile, lpFindFileData)
    Else
    FindNextFile = FindNextFileA(hFindFile, lpFindFileData)
    End If
  lpFindFileData.Filename = PeekS(VarPtr(lpFindFileData.Reserved_cFileName(0)), 260&)
  End Function
