MCPcopy Create free account
hub / github.com/Kenix3/libultraship / SFileFinishFile

Function SFileFinishFile

extern/StormLib/src/SFileAddFile.cpp:864–883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

862}
863
864bool WINAPI SFileFinishFile(HANDLE hFile)
865{
866 TMPQFile * hf = (TMPQFile *)hFile;
867 DWORD dwErrCode = ERROR_SUCCESS;
868
869 // Check the proper parameters
870 if(!IsValidFileHandle(hFile))
871 dwErrCode = ERROR_INVALID_HANDLE;
872 if(hf->bIsWriteHandle == false)
873 dwErrCode = ERROR_INVALID_HANDLE;
874
875 // Finish the file
876 if(dwErrCode == ERROR_SUCCESS)
877 dwErrCode = SFileAddFile_Finish(hf);
878
879 // Deal with errors
880 if(dwErrCode != ERROR_SUCCESS)
881 SetLastError(dwErrCode);
882 return (dwErrCode == ERROR_SUCCESS);
883}
884
885//-----------------------------------------------------------------------------
886// Adds a file to the archive

Callers 2

SFileAddFileExFunction · 0.85
AddFileMethod · 0.85

Calls 3

IsValidFileHandleFunction · 0.85
SFileAddFile_FinishFunction · 0.85
SetLastErrorFunction · 0.85

Tested by

no test coverage detected