IPersistMoniker::Save
Requests that the object save itself to the location referred to by pmkDst.
HRESULT Save(
IMoniker *pmkDst,
|
//Pointer to destination moniker
|
IBindCtx *pbc,
|
//Pointer to the moniker’s bind context
|
BOOL fRemember
|
//Specifies whether the destination moniker is to be the current working one
|
);
|
|
Parameters
-
pmkDst
-
[in] Pointer to the moniker referencing the location where the object should
persistently store itself. The object typically binds to the location through
a call to pmkDst->BindToStorage, requesting either the IStream
or IStorage interface. This parameter can be NULL, in which case the
object should save itself to the same location referred to by the moniker
passed to it in IPersistMoniker::Load. Using
the NULL value, can act as an optimization to prevent the object from binding,
since it has typically already bound to the moniker when it was loaded.
-
pbc
-
[in] Pointer to IBindCtx for the bind context to be used for any
moniker binding during this method.
-
fRemember
-
[in] Indicates whether pmkDst is to be used as the reference to the
current persistent state after the save. If TRUE, pmkDst becomes the
reference to the current persistent state and the object should clear its
dirty flag after the save. If FALSE, this save operation is a "Save A
Copy As ..." operation. In this case, the reference to the current
persistent state is unchanged, and the object should not clear its dirty flag.
If pmkDst is NULL, the implementation should ignore the fRemember
flag.
Return Values
-
S_OK
-
The object was successfully saved.
-
E_INVALIDARG
-
One or more parameters are invalid.
See Also
IPersistMoniker::GetCurMoniker,
IPersistMoniker::Load,
IPersistMoniker::SaveCompleted