IPersistFileFormat Interface

Definition

Obtains file format information about items that require saving, and enables the programmatic loading or saving of an object in a format specified by the user.

public interface class IPersistFileFormat : Microsoft::VisualStudio::OLE::Interop::IPersist
public interface class IPersistFileFormat : Microsoft::VisualStudio::OLE::Interop::IPersist
__interface IPersistFileFormat : Microsoft::VisualStudio::OLE::Interop::IPersist
[System.Runtime.InteropServices.Guid("3AFAE242-B530-11D0-8199-00A0C91BBEE3")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IPersistFileFormat : Microsoft.VisualStudio.OLE.Interop.IPersist
[System.Runtime.InteropServices.Guid("3AFAE242-B530-11D0-8199-00A0C91BBEE3")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IPersistFileFormat : Microsoft.VisualStudio.OLE.Interop.IPersist
[<System.Runtime.InteropServices.Guid("3AFAE242-B530-11D0-8199-00A0C91BBEE3")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IPersistFileFormat = interface
    interface IPersist
[<System.Runtime.InteropServices.Guid("3AFAE242-B530-11D0-8199-00A0C91BBEE3")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IPersistFileFormat = interface
    interface IPersist
Public Interface IPersistFileFormat
Implements IPersist
Derived
Attributes
Implements

Remarks

The IPersistFileFormat interface is based on the standard IPersistFile interface and augments it in the following ways:

  • Shows you how to properly specify a new, untitled file to the InitNew method.

  • Shows you that the file should be opened as a read-only file.

  • Eliminates the unnecessary Save As prompt string from GetCurFile.

  • Returns an error code when Save(null) is called on an untitled object.

IPersistFileFormat provides enough information for the client of an object to implement the Save As dialog box—that is, to fill in the Save As Type drop-down list and manage the initial file extension but still give complete flexibility to the object. Thus, the object owns all aspects of its file and format, including the name of its format.

Notes to Implementers

When saving documents or document editors that use the standard Save As dialog box implementation of the environment.

Methods

GetClassID(Guid)
GetCurFile(String, UInt32)

Returns the path to an object's current working file, or, if there is not a current working file, the object's default file name prompt.

GetFormatList(String)

Provides the caller with the information necessary to open the standard common Save As dialog box (using the GetSaveFileNameViaDlg(VSSAVEFILENAMEW[]) function) on behalf of the object.

InitNew(UInt32)

Instructs the object to initialize itself in the untitled state.

IsDirty(Int32)

Determines whether an object has changed since being saved to its current file.

Load(String, UInt32, Int32)

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

Save(String, Int32, UInt32)

Saves a copy of the object into the specified file.

SaveCompleted(String)

Notifies the object that it has concluded the Save transaction and that the object can write to its file.

Applies to