IPersistMemory::InitNew
Initializes the object to a default state. This method is called instead of IPersistMemory::Load.
HRESULT InitNew(void);
Return Values
-
S_OK
-
The object successfully initialized itself.
-
E_NOTIMPL
-
The object requires no default initialization. This error code is allowed
because an object may choose to implement IPersistMemory simply for
orthogonality or in anticipation of a future need for this method.
-
E_UNEXPECTED
-
This method was called after the object was already initialized with IPersistMemory::Load.
Only one initialization is allowed per instance.
-
E_OUTOFMEMORY
-
There was not enough memory for the object to initialize itself.
Notes to Implementers
If the object has already been initialized with Load, then this method
must return E_UNEXPECTED.
See Also
IPersistMemory::Load