Contents Index Topic Contents | ||
Previous Topic: IObjectWithSite::GetSite Next Topic: IPersistMemory::Load |
The IPersistMemory Interface
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.
IDL:
[ uuid(BD1AE5E0-A6AE-11CE-BD37-504200C10000) , object, pointer_default(unique) ] interface IPersistMemory : IPersist { HRESULT IsDirty(void); HRESULT Load([in, size_is(cbSize)] void *pvMem, [in] ULONG cbSize); HRESULT Save([in,out, size_is(cbSize)] void *pvMem, [in] BOOL fClearDirty, [in] ULONG cbSize); HRESULT GetSizeMax([out] ULONG* pcbSize); HRESULT InitNew(void); };The cbSize argument to Load and Save indicate the amount of memory accessible through pvMem.
The IsDirty, GetSizeMax, and InitNew members are semantically and syntactically identical to those in IPersistStreamInit. Only Load and Save differ as described below.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.