IPersistMemory::SaveIPersistMemory::Save*
*



Contents  *



Index  *Topic Contents
*Previous Topic: IPersistMemory::Load
*Next Topic: The IPersistPropertyBag Interface

IPersistMemory::Save

HRESULT IPersistMemory::Save([in] void *pvMem, 
		[in] BOOL fClearDirty, 
		[in] ULONG cbSize);

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.

pvMem
[in] The address of the memory in which the object should save up to cbSize bytes of its data.
fClearDirty
[in] A flag indicating whether the object should clear its dirty state on return from Save or leave that state as is.
cbSize
[in] The amount of memory available at pvMem 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.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.