IVsStructuredFileIO.OpenExisting Method

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.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
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
'Usage
Dim instance As IVsStructuredFileIO 
Dim szFileName As String 
Dim dwShareMode As UInteger 
Dim dwCreationDisposition As UInteger 
Dim dwFlagsAndAttributes As UInteger 
Dim pIVsStructuredFileIOHelper As IVsStructuredFileIOHelper 
Dim pnFormatIndex As UInteger 
Dim ppIVsPropertyFileIn As IVsPropertyFileIn 
Dim pbstrFormatVersion As String()
Dim returnValue As Integer 

returnValue = instance.OpenExisting(szFileName, _
    dwShareMode, dwCreationDisposition, _
    dwFlagsAndAttributes, pIVsStructuredFileIOHelper, _
    pnFormatIndex, ppIVsPropertyFileIn, _
    pbstrFormatVersion)
int OpenExisting(
    string szFileName,
    uint dwShareMode,
    uint dwCreationDisposition,
    uint dwFlagsAndAttributes,
    IVsStructuredFileIOHelper pIVsStructuredFileIOHelper,
    out uint pnFormatIndex,
    out IVsPropertyFileIn ppIVsPropertyFileIn,
    string[] pbstrFormatVersion
)
int OpenExisting(
    [InAttribute] String^ szFileName, 
    [InAttribute] unsigned int dwShareMode, 
    [InAttribute] unsigned int dwCreationDisposition, 
    [InAttribute] unsigned int dwFlagsAndAttributes, 
    [InAttribute] IVsStructuredFileIOHelper^ pIVsStructuredFileIOHelper, 
    [OutAttribute] unsigned int% pnFormatIndex, 
    [OutAttribute] IVsPropertyFileIn^% ppIVsPropertyFileIn, 
    [OutAttribute] array<String^>^ pbstrFormatVersion
)
function OpenExisting(
    szFileName : String, 
    dwShareMode : uint, 
    dwCreationDisposition : uint, 
    dwFlagsAndAttributes : uint, 
    pIVsStructuredFileIOHelper : IVsStructuredFileIOHelper, 
    pnFormatIndex : uint, 
    ppIVsPropertyFileIn : IVsPropertyFileIn, 
    pbstrFormatVersion : String[]
) : int

Parameters

  • szFileName
    Type: System.String

    [in] Null-terminated string containing the file name.

  • dwShareMode
    Type: System.UInt32

    [in] Double word containing the share mode.

  • dwCreationDisposition
    Type: System.UInt32

    [in] Double word containing the creation disposition.

  • dwFlagsAndAttributes
    Type: System.UInt32

    [in] Double word containing the flags and attributes.

  • pnFormatIndex
    Type: System.UInt32%

    [out] Pointer to an integer containing the format index.

  • pbstrFormatVersion
    Type: array<System.String[]

    [out, optional] Pointer to a string containing the format version.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From 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 Security

See Also

Reference

IVsStructuredFileIO Interface

IVsStructuredFileIO Members

Microsoft.VisualStudio.Shell.Interop Namespace