Click to return to the Component Development home page    
IPersistMemory::IsDirty M...     IPersistMemory::Save Meth...     IPersistMemory Interface    
Web Workshop  |  Component Development

IPersistMemory::Load Method


Instructs the object to load its persistent data from memory.

Syntax

HRESULT IPersistMemory::Load(
    void *pvMem, 
    ULONG cbSize
);

Parameters

pvMem
[in] Address of the memory from which the object can read up to cbSize bytes of its data. The object must not read past the address (BYTE*)((BYTE *)pvMem+cbSize).
cbSize
[in] Amount of memory available at pvMem from which the object can read its data.

Return Value

Returns one of the following values:

S_OK The object successfully loaded its data.
E_UNEXPECTED This member was called after the object was already initialized with IPersistMemory::Load. Only one initialization is allowed per instance.
E_POINTER The pointer in pvMem is NULL.

Remarks

Any object that implements IPersistMemory has some information to load persistently; therefore, E_NOTIMPL is not a valid return code.



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.