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 indicates whether the object has changed since it was last saved to its current storage.
HRESULT IsDirty( void );
Return Values
One of the values described in the following table is returned.
Value | Description |
---|---|
S_OK | The object has changed since it was last saved. |
S_FALSE | The object has not changed since the last save. |
Remarks
This method checks whether an object has changed since it was last saved so you can save it before closing it. The dirty flag for an object is conditionally cleared in the IPersistStorage::Savemethod.
For example, you could optimize a File:Save operation by calling the IPersistStorage::IsDirtymethod for each object and then calling the IPersistStorage::Savemethod only for those objects that are dirty.
Notes to Callers
You should treat any error return codes as an indication that the object has changed. In other words, unless this method explicitly returns S_FALSE, you must assume that the object needs to be saved.
Notes to Implementers
A container with one or more contained objects must maintain an internal dirty flag that is set whenever any of its contained objects are dirty.
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Oleidl.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also