Click to return to the Component Development home page    
IPersistHistory::SetPosit...     IPersistMemory::GetSizeMa...     Component Interface Refer...    
Web Workshop  |  Component Development

IPersistMemory Interface


The IPersistMemory interface saves and loads objects from a stream.

IPersistMemory Methods

GetSizeMax Returns the size, in bytes, of the stream needed to save the object.
InitNew Initializes the object to a default state.
IsDirty Checks the object for changes since it was last saved.
Load Instructs the object to load its persistent data from memory.
Save Instructs the object to save its persistent data to memory.

Interface Information

Implementation Custom
Inherits from IPersist
Header and IDL files Ocidl.h; Ocidl.idl
Minimum availability Internet Explorer 4.0
Minimum operating systems Windows 95, Windows NT 4.0

Remarks

IPersistMemory operates exactly as IPersistStreamInit, except that it allows the caller to provide a fixed-size memory block (identified with a void *) as opposed to IPersistStreamInit, which involves an arbitrarily expandable IStream.

The cbSize argument to Load and Save indicates the amount of memory accessible through the pvMem pointer.

The IsDirty, GetSizeMax, and InitNew members are semantically and syntactically identical to those in IPersistStreamInit.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.