IPersistFile interface (objidl.h)

Enables an object to be loaded from or saved to a disk file, rather than a storage object or stream. Because the information needed to open a file varies greatly from one application to another, the implementation of IPersistFile::Load on the object must also open its disk file.


The IPersistFile interface inherits from IPersist. IPersistFile also has these types of members:


The IPersistFile interface has these methods.


Retrieves the current name of the file associated with the object. If there is no current working file, this method retrieves the default save prompt for the object.

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

Opens the specified file and initializes an object from the file contents.

Saves a copy of the object to the specified file.

Notifies the object that it can write to its file.


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