Share via


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
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
)
abstract OpenExisting : 
        szFileName:string * 
        dwShareMode:uint32 * 
        dwCreationDisposition:uint32 * 
        dwFlagsAndAttributes:uint32 * 
        pIVsStructuredFileIOHelper:IVsStructuredFileIOHelper * 
        pnFormatIndex:uint32 byref * 
        ppIVsPropertyFileIn:IVsPropertyFileIn byref * 
        pbstrFormatVersion:string[] byref -> int
function OpenExisting(
    szFileName : String, 
    dwShareMode : uint, 
    dwCreationDisposition : uint, 
    dwFlagsAndAttributes : uint, 
    pIVsStructuredFileIOHelper : IVsStructuredFileIOHelper, 
    pnFormatIndex : uint, 
    ppIVsPropertyFileIn : IVsPropertyFileIn, 
    pbstrFormatVersion : String[]
) : int

Parameters

  • szFileName
    Type: String

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

  • dwShareMode
    Type: UInt32

    [in] Double word containing the share mode.

  • dwCreationDisposition
    Type: UInt32

    [in] Double word containing the creation disposition.

  • dwFlagsAndAttributes
    Type: UInt32

    [in] Double word containing the flags and attributes.

  • pnFormatIndex
    Type: UInt32%

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

  • pbstrFormatVersion
    Type: array<String[]

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

Return Value

Type: 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

Microsoft.VisualStudio.Shell.Interop Namespace