IPersistStream::IsDirty method

Determines whether an object has changed since it was last saved to its stream.

Syntax

HRESULT IsDirty(

);

Parameters

This method has no parameters.

Return Value

This method returns S_OK to indicate that the object has changed. Otherwise, it returns S_FALSE.

Remarks

Use this method to determine whether an object should be saved before closing it. The dirty flag for an object is conditionally cleared in the IPersistStream::Save method.

Notes to Callers

You should treat any error return codes as an indication that the object has changed. Unless this method explicitly returns S_FALSE, assume that the object must 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

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objidl.h

See Also

IPersistStream