IVsStructuredFileIO.OpenExisting 方法

打开以前创建的结构化文件数据元素并返回指向格式索引、元素和指向包含布局版本的字符串。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
Function OpenExisting ( _
    szFileName As String, _
    dwShareMode As UInteger, _
    dwCreationDisposition As UInteger, _
    dwFlagsAndAttributes As UInteger, _
    pIVsStructuredFileIOHelper As IVsStructuredFileIOHelper, _
    <OutAttribute> ByRef pnFormatIndex As UInteger, _
    <OutAttribute> ByRef ppIVsPropertyFileIn As IVsPropertyFileIn, _
    <OutAttribute> pbstrFormatVersion As String() _
) As Integer
int OpenExisting(
    string szFileName,
    uint dwShareMode,
    uint dwCreationDisposition,
    uint dwFlagsAndAttributes,
    IVsStructuredFileIOHelper pIVsStructuredFileIOHelper,
    out uint pnFormatIndex,
    out IVsPropertyFileIn ppIVsPropertyFileIn,
    string[] pbstrFormatVersion
)

参数

  • szFileName
    类型:System.String
    [in] 包含文件名的 null 终止的字符串。
  • dwShareMode
    类型:System.UInt32
    [in] 包含共享模式的双字。
  • dwCreationDisposition
    类型:System.UInt32
    [in] 包含可创建处置的双字。
  • dwFlagsAndAttributes
    类型:System.UInt32
    [in] 包含带有和特性的双字。
  • pnFormatIndex
    类型:System.UInt32%
    [out] 对包含布局索引的整数的指针。
  • pbstrFormatVersion
    类型:array<System.String[]
    [out, optional] 对包含布局版本的字符串的指针。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell.idl:

HRESULT IVsStructuredFileIO::OpenExisting(
   [in] LPCOLESTR szFileName,
   [in] DWORD dwShareMode,
   [in] DWORD dwCreationDisposition,
   [in] DWORD dwFlagsAndAttributes,
   [in] IVsStructuredFileIOHelper *pIVsStructuredFileIOHelper,
   [out] ULONG *pnFormatIndex,
   [out] IVsPropertyFileIn **ppIVsPropertyFileIn,
   [out, optional] BSTR *pbstrFormatVersion
);

.NET Framework 安全性

请参见

参考

IVsStructuredFileIO 接口

Microsoft.VisualStudio.Shell.Interop 命名空间