Partager via


IPersistStream::IsDirty (Windows CE 5.0)

Send Feedback

This method checks the object for changes since it was last saved.

HRESULT IsDirty(void);

Parameters

None.

Return Values

If the object has changed since it was last saved, the return value is S_OK.

If the object has not changed since the last save, the return value is S_FALSE.

Remarks

This method checks whether an object has changed since it was last saved so you can avoid losing information in objects that have not yet been saved. The dirty flag for an object is conditionally cleared in the IPersistStream::Save method.

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.

Note that the OLE-provided implementations of the IPersistStream::IsDirty method in the OLE-provided moniker interfaces always return S_FALSE because their internal state never changes.

Requirements

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

See Also

IPersistStream::Save

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.