SetCompressorInformation function (compressapi.h)

Sets information in a compressor for a particular compression algorithm.

Syntax

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

Parameters

[in] CompressorHandle

Handle to the compressor.

[in] CompressInformationClass

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

[in] CompressInformation

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

[in] 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

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header compressapi.h
Library Cabinet.lib
DLL Cabinet.dll

See also

Compression API Functions