Contents Index Topic Contents | ||
Previous Topic: IPersistPropertyBag::Load Next Topic: The IPropertyBag Interface |
IPersistPropertyBag::Save
HRESULT Save( IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties);Instructs the object to save its properties to the given property bag, optionally clearing the object's "dirty" flag. The caller can request that the object save all properties or that the object save only those that are known to have changed.
- Returns one of the following values:
S_OK The object successfully saved the requested properties itself. E_FAIL There was a problem saving one of the properties. The object can choose to fail only if a necessary property could not be saved, meaning that the object can assume default property values if a given property is not seen through Load at some later time. E_POINTER The address in pPropBag is not valid (such as NULL) and therefore the object cannot initialize itself.
- pPropBag
- [in] Address of the caller's property bag through which the object can write properties. Cannot be NULL.
- fClearDirty
- [in] Flag indicating whether the object should clear its dirty flag when saving is complete. TRUE means clear the flag, FALSE means leave the flag unaffected. FALSE is used when the caller wants to do a "Save Copy As" operation.
- fSaveAllProperties
- [in] Flag indicating whether the object should save all its properties (TRUE) or only those that have changed from the default value (FALSE).
E_NOTIMPL is not a valid return code because any object implementing this interface must support the entire functionality of the interface.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.