Share via


IPersistStreamInit::GetSizeMax

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method returns the size in bytes of the stream needed to save the object.

Syntax

HRESULT GetSizeMax(
  ULARGE_INTEGER* pcbSize 
);

Parameters

  • pcbSize
    [out] Points to a 64-bit unsigned integer value indicating the size in bytes of the stream needed to save this object.

Return Value

  • S_OK
    The size was successfully returned.

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.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

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 nongrowable stream.

Requirements

Header ocidl.h, ocidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later