StormLib API Reference
SFileSetCompactCallback
bool WINAPI SFileSetCompactCallback( HANDLE hMpq // Handle to an open MPQ. SFILE_COMPACT_CALLBACK pfnCompactCB // Pointer to callback function void * pvUserData // Pointer to custom data );
Function SFileSetCompactCallback sets a callback that will be called during operations performed by SFileCompactArchive. Registering a callback will help the calling application to show a progress about the operation, which will enhance user experience with the application.
void WINAPI CompactCallback( void * pvUserData, // Custom pointer passed to SFileSetCompactCallback DWORD dwWorkType, // Work currently being done LARGE_INTEGER * pBytesProcessed, // Number of bytes already processed LARGE_INTEGER * pTotalBytes // Total number of bytes to process );
Value | Meaning |
---|---|
CCB_CHECKING_FILES (1) |
Checking if all files in the archive are known. |
CCB_CHECKING_HASH_TABLE (2) |
Checking hash table of the archive. |
CCB_COPYING_NON_MPQ_DATA (3) |
SFileCompactArchive is copying non-MPQ that precede the archive itself. |
CCB_COMPACTING_FILES (4) |
SFileCompactArchive is writing the files to the new MPQ. |
CCB_CLOSING_ARCHIVE (5) |
SFileCompactArchive is closing the MPQ. |
The function never fails and always sets the callback.
After SFileCompactArchive finishes, the compact callback is invalidated. For eventual next call to SFileCompactArchive, the calling application must set the compact callback again.
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