SetSize method

Project: Stream Extension Classes

Unit: PJIStreams

Classes: TPJIStreamWrapper, TPJHandleIStreamWrapper, TPJFileIStream

Applies to: ~>3.0

function SetSize(libNewSize: Largeint): HResult; virtual; stdcall;

Description

Changes the size of the wrapped stream.

Parameters:

Returns:

Remarks

If the requested size of the wrapped stream is too large the stream size may be set to a smaller value than requested and E_FAIL will be returned.

[~>3.0.0] Although libNewSize accepts 64 bit values the implementation of SetSize is limited to positive 32 bit integer values. Passing a value greater than MaxInt or less than zero in the libNewSize parameter causes the method to return STG_E_INVALIDFUNCTION.

[~>3.1] libNewSize works as expected for values > MaxInt.