StormLib API Reference
SFileFindFirstFile
HANDLE WINAPI SFileFindFirstFile( HANDLE hMpq, // Archive handle const char * szMask, // Search mask SFILE_FIND_DATA * lpFindFileData, // Pointer to the search result const char * szListFile // Name of additional listfile );
Function SFileFindFirstFile searches an MPQ archive and returns name of the first file that matches the given search mask and exists in the MPQ archive. When the caller finishes searching, the returned handle must be freed by calling SFileFindClose.
struct SFILE_FIND_DATA { char cFileName[MAX_PATH]; // Name of the found file char * szPlainName; // Plain name of the found file DWORD dwHashIndex; // Hash table index for the file DWORD dwBlockIndex; // Block table index for the file DWORD dwFileSize; // Uncompressed size of the file, in bytes DWORD dwFileFlags; // MPQ file flags DWORD dwCompSize; // Compressed file size DWORD dwFileTimeLo; // Low 32-bits of the file time (0 if not present) DWORD dwFileTimeHi; // High 32-bits of the file time (0 if not present) LCID lcLocale; // Locale version };
When the function succeeds, it returns handle to the MPQ search object and the SFILE_FIND_DATA structure is filled with information about the file. On an error, the function returns NULL and GetLastError gives the error code.
Note that even if names within MPQs contain "folder names", the searching functions don't support folders. The entire line in the list file is considered a file name.
Available in Storm.dll | No |
Ordinal number in Storm.dll 1.00 | N/A |
Ordinal number in Storm.dll 1.09 | N/A |
Copyright (c) Ladislav Zezula 2003 - 2010