SetCompressorInformation function

Sets information in a compressor for a particular compression algorithm.

Syntax

BOOL SetCompressorInformation(
  COMPRESSOR_HANDLE          CompressorHandle,
  COMPRESS_INFORMATION_CLASS CompressInformationClass,
  LPCVOID                    CompressInformation,
  SIZE_T                     CompressInformationSize
);

Parameters

CompressorHandle

Handle to the compressor.

CompressInformationClass

A value that identifies the type of information. of the enumeration that identifies the type of information.

CompressInformation

The information being set read as bytes. The maximum size in bytes is given by CompressInformationSize.

CompressInformationSize

Maximum size of the information in bytes.

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.

Remarks

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. If the compression algorithm does not allow changing the value of this information class, the error can be ERROR_NOT_SUPPORTED. If the compression algorithm does not allow the information class, the error can be ERROR_UNSUPPORTED_TYPE.

Requirements

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

See Also

Compression API Functions