共用方式為


IVsStructuredFileIO Interface

Definition

Provides a common way to perform multi-format saves. You can get an instance of the interface from the SVsStructuredFileIO (SID_SVsStructuredFileIO) service.

public interface class IVsStructuredFileIO
public interface class IVsStructuredFileIO
__interface IVsStructuredFileIO
[System.Runtime.InteropServices.Guid("12B43F9F-8550-4FFA-850F-FE9D4D396C20")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsStructuredFileIO
[System.Runtime.InteropServices.Guid("12B43F9F-8550-4FFA-850F-FE9D4D396C20")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsStructuredFileIO
[<System.Runtime.InteropServices.Guid("12B43F9F-8550-4FFA-850F-FE9D4D396C20")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsStructuredFileIO = interface
[<System.Runtime.InteropServices.Guid("12B43F9F-8550-4FFA-850F-FE9D4D396C20")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsStructuredFileIO = interface
Public Interface IVsStructuredFileIO
Attributes

Remarks

The IVsStructuredFileIO interface provides a common way to do multi-format saves. It includes rudimentary support for using IPersistFileFormat.

The IVsStructuredFileIOHelper interface works with IVsStructuredFileIO and enables loading tokens in persisted files that are to be loaded with localized strings. For example, the IVsStructuredFileIO implementation looks for property values of the form "nnnn", where "nnnn" is a series of decimal digits, and requests string ID nnnn to be loaded through your implementation of LoadLocalizedString.

Notes to Implementers

Implemented by VSPackages that need to take advantage of multi-format file saves for persisted files.

Notes to Callers

Called by the environment when persisted data is to be saved to a structured file.

Methods

CreateNew(String, UInt32, UInt32, UInt32, UInt32, IVsStructuredFileIOHelper, String, String, IVsPropertyFileOut)

Creates a new multi-format file with format index.

FindFormatIndex(UInt32, UInt32[])

Returns the format index for the CodePage of the data object.

GetFormatInfo(UInt32, UInt32[])

Returns the format information for the format index.

GetFormatList(String, String, String)

Returns the format list for the file types supported by your VSPackage.

OpenExisting(String, UInt32, UInt32, UInt32, IVsStructuredFileIOHelper, UInt32, IVsPropertyFileIn, String[])

Open a previously created structured file data element and returns a pointer to the format index, data element, and pointer to a string containing the format version.

Applies to