IPersistFile 介面

定義

提供 IPersistFile 介面的 Managed 定義,具有 IPersist 的功能。

public interface class IPersistFile
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IPersistFile
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
[System.Runtime.InteropServices.Guid("0000010b-0000-0000-C000-000000000046")]
public interface IPersistFile
public interface IPersistFile
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IPersistFile = interface
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
[<System.Runtime.InteropServices.Guid("0000010b-0000-0000-C000-000000000046")>]
type IPersistFile = interface
type IPersistFile = interface
Public Interface IPersistFile
屬性

備註

如需詳細資訊,請參閱 MSDN 程式庫中 和 IPersist 的現有檔 IPersistFile

Common Language Runtime 會在機器碼中的 COM 方法傳回 HRESULT 時擲回例外狀況。 如需詳細資訊,請參閱 How to: Map HRESULTs and Exceptions

方法

GetClassID(Guid)

擷取物件的類別識別項 (Class Identifier,CLSID)。

GetCurFile(String)

擷取物件目前工作檔的絕對路徑,如果沒有目前工作檔,則擷取物件的預設檔案名稱提示。

IsDirty()

檢查物件自從儲存到它目前檔案以來的變更。

Load(String, Int32)

開啟指定的檔案,並從檔案連接初始化物件。

Save(String, Boolean)

儲存物件的複本到指定檔案中。

SaveCompleted(String)

告知物件,它可以寫入其檔案。

適用於