This method of the IPersistStreamInit interface 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 IPersistStreamInit.Save method.
public boolean IsDirty();
S_OK -- The object has changed since it was last saved.
S_FALSE -- The object has not changed since the last save.