StormLib API Reference
bool WINAPI SFileWriteFile( HANDLE hFile, // Handle to the file const void * pvData, // Pointer to data to be written DWORD dwSize, // Size of the data pointed by pvData DWORD dwCompression // Specifies compression of the data block );
Function SFileWriteFile writes data to the archive. The file must have been created by SFileCreateFile.
When the function succeeds, it returns nonzero. On an error, the function returns false and GetLastError gives the error code.
The amount of data written by one call of SFileWriteFile may be arbitrary. Attempt to write zero data equals to no operation and succeeds. SFileWriteFile collects the data into a memory buffer, up to the size of one file sector. After that, the data is compressed (if wanted), encrypted (if wanted) and flushed to the MPQ.
The caller must make sure that the total amount of data written to the file will exactly match to the file size, specified by call to SFileCreateFile. Attempting to write more data causes the function to return false and GetLastError() returns ERROR_DISK_FULL.
The dwCompression only applies when amount of buffered data stored by SFileWriteFile reaches size of one file sector, and thus the data will be written to the MPQ. Otherwise, it has no effect.
|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