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.
Methods
The IPersistStreamInit interface inherits from IPersist.
In addition, IPersistStreamInit defines the following methods.
| Method | Description |
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.
|
GetSizeMax |
Retrieves the size of the stream needed to save the object.
|
InitNew |
Initializes an object to a default state.
|
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | OCIdl.h |
| IDL | OCIdl.idl |
| IID | IID_IPersistStreamInit is defined as 7FD52380-4E07-101B-AE2D-08002B2EC713 |
See Also
- IPersistStream
Send comments about this topic to Microsoft
Build date: 11/12/2009