CloseCompressor function

Call to close an open COMPRESSOR_HANDLE.


BOOL CloseCompressor(
  COMPRESSOR_HANDLE CompressorHandle



Handle to the compressor to be closed. This is the handle to the compressor that was returned by CreateCompressor.

Return value

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.


If the compression algorithm fails for some internal reason, the error from GetLastError can be ERROR_FUNCTION_FAILED. If the system cannot locate the compression algorithm handle, the error can be ERROR_INVALID_HANDLE.


Target Platform Windows
Header compressapi.h
Library Cabinet.lib
DLL Cabinet.dll

See also

Compression API Functions