다음을 통해 공유


IPersistStorage::IsDirty (Windows CE 5.0)

Send Feedback

This method indicates whether the object has changed since it was last saved to its current storage.

HRESULT IsDirty(void);

Parameters

None.

Return Values

The following table shows the return values for this method.

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::Save method.

For example, you could optimize a File:Save operation by calling the IPersistStorage::IsDirty method for each object and then calling the IPersistStorage::Save method only for those objects that are dirty.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

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

OS Versions: Windows CE 2.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib, Uuid.lib.

See Also

IPersistStorage::Save

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.