IPersistStreamInit::GetSizeMax method (ocidl.h)

Retrieves the size of the stream needed to save the object.

Syntax

HRESULT GetSizeMax(
  [out] ULARGE_INTEGER *pCbSize
);

Parameters

[out] pCbSize

The size in bytes of the stream needed to save this object, in bytes.

Return value

This method returns S_OK to indicate that the size was retrieved successfully.

Remarks

This method returns the size needed to save an object. You can call this method to determine the size and set the necessary buffers before calling the IPersistStreamInit::Save method.

Notes to Implementers

The GetSizeMax implementation should return a conservative estimate of the necessary size because the caller might call the IPersistStreamInit::Save method with a non-growable stream.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See also

IPersistStreamInit