StormLib API Reference



HANDLE WINAPI SListFileFindFirstFile(
  HANDLE hMpq,                      // Archive handle
  const char * szListFile,          // Name of additional listfile
  const char * szMask,              // Search mask
  SFILE_FIND_DATA * lpFindFileData  // Pointer to the search result

Function SListFileFindFirstFile searches a listfile and returns name of the first file that matches the given search mask. When the caller finishes searching, the returned handle must be freed by calling SListFileFindClose. Note that unlike SFileFindFirstFile, this function does not check if the file exists within the archive and doesn't call SFileAddListFile.


[in] Handle to an open archive. This parameter must only be valid if szListFile is NULL.
[in] Name of the listfile that will be used for searching. If this parameter is NULL, the function searches the MPQ internal listfile (if any).
[in] Name of the search mask. "*" will return all files.
[out] Pointer to SFILE_FIND_DATA structure that will receive name of the found file. For layout of this structure, see SFileFindFirstFile.

Return Value

When the function succeeds, it returns handle to the MPQ search object and the cFileName member of SFILE_FIND_DATA structure is filled with name of 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.

Availability in Storm.dll

Available in Storm.dll No
Ordinal number in Storm.dll 1.00 N/A
Ordinal number in Storm.dll 1.09 N/A