IPersistStream::GetSizeMax method

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

Syntax


HRESULT GetSizeMax(
  [out]  ULARGE_INTEGER *pcbSize
);

Parameters

pcbSize [out]

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 IPersistStream::Save method.

Notes to Implementers

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

URL Moniker Notes

This method retrieves the maximum number of bytes in the stream that will be required by a subsequent call to IPersistStream::Save. This value is sizeof(ULONG)==4 plus sizeof(WCHAR)*n where n is the length of the full or partial URL string, including the NULL terminator.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IPersistStream is defined as 00000109-0000-0000-C000-000000000046

See also

IPersistStream

 

 

Community Additions

ADD
Show:
© 2014 Microsoft