StormLib API Reference
SFileCreateArchive
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.
Value | Meaning |
---|---|
MPQ_CREATE_LISTFILE (0x00100000) |
The newly created archive will have (listfile) present. Note that all archives created by SFileCreateArchive have listfile present due to compatibility reasons. |
MPQ_CREATE_ATTRIBUTES (0x00200000) |
The newly created archive will have additional attributes in (attributes) file. |
MPQ_CREATE_SIGNATURE (0x00400000) |
The newly created archive will be signed with weak digital signature (the "(signature) file). |
MPQ_CREATE_ARCHIVE_V1 (0x00000000) |
The function creates a MPQ version 1.0 (up to 4 GB). This is the default value |
MPQ_CREATE_ARCHIVE_V2 (0x01000000) |
The function creates a MPQ version 2.0 (supports MPQ of size greater than 4 GB). |
MPQ_CREATE_ARCHIVE_V3 (0x02000000) |
The function creates a MPQ version 3.0 (introduced in WoW-Cataclysm Beta). |
MPQ_CREATE_ARCHIVE_V4 (0x03000000) |
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