Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method instructs the object to save its properties to the given property bag, and optionally to clear the object's dirty flag.
Syntax
HRESULT Save( IPropertyBag* pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties ); |
Parameters
- pPropBag
-
[in] Address of the caller's property bag through which the object can write properties.
This cannot be NULL.
- fClearDirty
-
[in] Flag indicating whether the object should clear its dirty flag when saving is complete.
TRUE means clear the flag, and 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).
Return Value
The following table shows return values.
Value | Description |
---|---|
S_OK |
The object successfully saved the requested properties. |
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. |
E_POINTER |
The address in pPropBagis not valid and therefore the object cannot initialize itself. If the value of pPropBagis NULL, the method returns E_POINTER. |
Remarks
The caller can request that the object save all properties or only those that are known to have changed.
E_NOTIMPL is not a valid return code because any object implementing this interface must support the entire functionality of the interface.
Requirements
Header | ocidl.h, ocidl.idl |
Library | ole32.lib, uuid.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |