CascLib API Reference

CascCloseStorage

Description


  bool WINAPI CascCloseStorage(
      HANDLE hStorage                       // Handle to an open storage
      );

Function CascCloseStorage closes a storage previously opened by CascOpenStorageEx, CascOpenStorage or CascOpenOnlineStorage.

Parameters

hStorage [in]
Handle to an open storage.

Return Value

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

Remarks

Storage handles are reference counted. Each file opened within the storage and also each search opened within storage increments number of references. Thus, closing a storage while a file is open does not actually destroy the opened storage.