Instructs the object to save its persistent data to the memory pointed to by pvMem where cbSize indicates the amount of memory available at pvMem. The object must not write past the address (BYTE*)((BYTE *)pvMem+cbSize). The fClearDirty flag determines whether the object is to clear its dirty state after the save is complete.
HRESULT Save(
void* pvMem, //Pointer to the stream where the object is to
//be saved
BOOL fClearDirty, //Specifies whether to clear the dirty flag
ULONG cbSize //Amount of memory to which the object can
//write its data
);
Any object that implements IPersistMemory has some information to save persistently, therefore E_NOTIMPL is not a valid return code.
The caller should ideally allocate as many bytes as the object returns from IPersistMemory::GetSizeMax.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in ocidl.h.
IPersistMemory::InitNew, IPersistMemory::Load