IVsStructuredFileIO.OpenExisting 方法

定义

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

int OpenExisting(std::wstring const & szFileName, unsigned int dwShareMode, unsigned int dwCreationDisposition, unsigned int dwFlagsAndAttributes, Microsoft::VisualStudio::Shell::Interop::IVsStructuredFileIOHelper const & pIVsStructuredFileIOHelper, [Runtime::InteropServices::Out] unsigned int & pnFormatIndex, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsPropertyFileIn const & & ppIVsPropertyFileIn, std::Array <std::wstring const &> const & pbstrFormatVersion);
public int OpenExisting (string szFileName, uint dwShareMode, uint dwCreationDisposition, uint dwFlagsAndAttributes, Microsoft.VisualStudio.Shell.Interop.IVsStructuredFileIOHelper pIVsStructuredFileIOHelper, out uint pnFormatIndex, out Microsoft.VisualStudio.Shell.Interop.IVsPropertyFileIn ppIVsPropertyFileIn, string[] pbstrFormatVersion);
abstract member OpenExisting : string * uint32 * uint32 * uint32 * Microsoft.VisualStudio.Shell.Interop.IVsStructuredFileIOHelper * uint32 * IVsPropertyFileIn * string[] -> int
Public Function OpenExisting (szFileName As String, dwShareMode As UInteger, dwCreationDisposition As UInteger, dwFlagsAndAttributes As UInteger, pIVsStructuredFileIOHelper As IVsStructuredFileIOHelper, ByRef pnFormatIndex As UInteger, ByRef ppIVsPropertyFileIn As IVsPropertyFileIn, Optional pbstrFormatVersion As String()) As Integer

参数

szFileName
String

中以 Null 结尾的包含文件名的字符串。

dwShareMode
UInt32

中包含共享模式的双字。

dwCreationDisposition
UInt32

中包含创建处置的双字。

dwFlagsAndAttributes
UInt32

中包含标志和属性的双字。

pIVsStructuredFileIOHelper
IVsStructuredFileIOHelper

中指向对象的指针 IVsStructuredFileIOHelper

pnFormatIndex
UInt32

弄指向包含格式索引的整数的指针。

ppIVsPropertyFileIn
IVsPropertyFileIn

弄指向对象的指针的指针 IVsPropertyFileIn

pbstrFormatVersion
String[]

[out,optional]指向包含格式版本的字符串的指针。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 vsshell:

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  
);  

适用于