Share via


IPersistStream::IsDirty

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

HRESULT IsDirty(void);

Parameters

None.

Return Value

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

Header objidl.h, objidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IPersistStream::Save