Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

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.