Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​Runtime.​InteropServices.​ComTypes.​IPersistFile

Assembly: System.Runtime.InteropServices

Provides the managed definition of the <see langword="IPersistFile" /> interface, with functionality from <see langword="IPersist" /> .

Methods

public void
GetClassID​(Guid& pClassID)
public void
GetCurFile​(String& ppszFileName)
public int
IsDirty​()
Returns <see langword="S_OK" /> if the file has changed since it was last saved; <see langword="S_FALSE" /> if the file has not changed since it was last saved.
Checks an object for changes since it was last saved to its current file.
public void
Load​(string pszFileName, int dwMode)
pszFileName A zero-terminated string containing the absolute path of the file to open.
dwMode A combination of values from the <see langword="STGM" /> enumeration to indicate the access mode in which to open <paramref name="pszFileName" /> .
Opens the specified file and initializes an object from the file contents.
public void
Save​(string pszFileName, bool fRemember)
pszFileName A zero-terminated string containing the absolute path of the file to which the object is saved.
fRemember <see langword="true" /> to used the <paramref name="pszFileName" /> parameter as the current working file; otherwise <see langword="false" /> .
Saves a copy of the object into the specified file.
public void
SaveCompleted​(string pszFileName)
pszFileName The absolute path of the file where the object was previously saved.
Notifies the object that it can write to its file.