StormLib API Reference
bool WINAPI SFileCreateArchive( const TCHAR * szMpqName, // Archive file name DWORD dwCreateFlags, // Additional flags to specify creation details DWORD dwMaxFileCount, // Limit for file count HANDLE * phMPQ // Pointer to result HANDLE );
Function SFileCreateArchive opens or creates the MPQ archive. The function can also convert an existing file to MPQ archive. The MPQ archive is always open for write operations.
The function internally verifies the file using SFileOpenArchive. If the file already exists and it is an MPQ archive, the function fails and GetLastError() returns ERROR_ALREADY_EXISTS.
|The newly created archive will have (listfile) present.
Note that all archives created by SFileCreateArchive have listfile present due to compatibility reasons.
|The newly created archive will have additional attributes in (attributes) file.|
|The newly created archive will be signed with weak digital signature (the "(signature) file).|
|The function creates a MPQ version 1.0 (up to 4 GB). This is the default value|
|The function creates a MPQ version 2.0 (supports MPQ of size greater than 4 GB).|
|The function creates a MPQ version 3.0 (introduced in WoW-Cataclysm Beta).|
|The function creates a MPQ version 4.0 (used in WoW-Cataclysm).|
When the function succeeds, it returns nonzero and phMPQ contains the handle of the new archive. On an error, the function returns false and GetLastError gives the error code.
|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