CascLib API Reference

CascCloseFile

Description


  bool WINAPI CascCloseFile(
      HANDLE hFile                 // Handle to an open file
      );

Function CascCloseFile closes a file previously open by CascOpenFile.

Parameters

hFile [in]
Handle to an open CASC file.

Return Value

On success, the function returns true.
On failure, the function returns false and GetLastError() returns the error code.

Notes

Every successfull CascOpenFile() increments a reference counter in the storage handle. Every valid CascCloseFile() decrements this counter. If CascCloseStorage() is called while there are files open, the storage handle remains valid until the last file handle is closed.