Export (0) Print
Expand All

IPersistStreamInit interface

A replacement for IPersistStream that adds an initialization method.

This interface is not derived from IPersistStream; it is mutually exclusive with IPersistStream. An object chooses to support only one of the two interfaces, based on whether it requires the InitNew method.

When to implement

Implement this interface on any object that needs to support initialized stream-based persistence, regardless of whatever else the object does. The presence of the InitNew method requires some changes to other methods that are common to IPersistStream, as noted in the documentation for each method.

When to use

Use this interface to initialize a stream-based object and to save that object to a stream.

Members

The IPersistStreamInit interface inherits from IPersist. IPersistStreamInit also has these types of members:

Methods

The IPersistStreamInit interface has these methods.

MethodDescription
GetSizeMax

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

InitNew

Initializes an object to a default state.

IsDirty

Determines whether an object has changed since it was last saved to its stream.

Load

Initializes an object from the stream where it was saved previously.

Save

Saves an object to the specified stream.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IPersistStreamInit is defined as 7FD52380-4E07-101B-AE2D-08002B2EC713

See also

IPersistStream

 

 

Community Additions

ADD
Show:
© 2014 Microsoft