IVsStructuredFileIO.CreateNew Method

Creates a new multi-format file with format index.

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

Syntax

'Declaration
Function CreateNew ( _
    szFileName As String, _
    nFormatIndex As UInteger, _
    dwShareMode As UInteger, _
    dwCreationDisposition As UInteger, _
    dwFlagsAndAttributes As UInteger, _
    pIVsStructuredFileIOHelper As IVsStructuredFileIOHelper, _
    szFormatVersion As String, _
    szDescription As String, _
    <OutAttribute> ByRef ppIVsPropertyFileOut As IVsPropertyFileOut _
) As Integer
'Usage
Dim instance As IVsStructuredFileIO 
Dim szFileName As String 
Dim nFormatIndex As UInteger 
Dim dwShareMode As UInteger 
Dim dwCreationDisposition As UInteger 
Dim dwFlagsAndAttributes As UInteger 
Dim pIVsStructuredFileIOHelper As IVsStructuredFileIOHelper 
Dim szFormatVersion As String 
Dim szDescription As String 
Dim ppIVsPropertyFileOut As IVsPropertyFileOut 
Dim returnValue As Integer 

returnValue = instance.CreateNew(szFileName, _
    nFormatIndex, dwShareMode, dwCreationDisposition, _
    dwFlagsAndAttributes, pIVsStructuredFileIOHelper, _
    szFormatVersion, szDescription, _
    ppIVsPropertyFileOut)
int CreateNew(
    string szFileName,
    uint nFormatIndex,
    uint dwShareMode,
    uint dwCreationDisposition,
    uint dwFlagsAndAttributes,
    IVsStructuredFileIOHelper pIVsStructuredFileIOHelper,
    string szFormatVersion,
    string szDescription,
    out IVsPropertyFileOut ppIVsPropertyFileOut
)
int CreateNew(
    [InAttribute] String^ szFileName, 
    [InAttribute] unsigned int nFormatIndex, 
    [InAttribute] unsigned int dwShareMode, 
    [InAttribute] unsigned int dwCreationDisposition, 
    [InAttribute] unsigned int dwFlagsAndAttributes, 
    [InAttribute] IVsStructuredFileIOHelper^ pIVsStructuredFileIOHelper, 
    [InAttribute] String^ szFormatVersion, 
    [InAttribute] String^ szDescription, 
    [OutAttribute] IVsPropertyFileOut^% ppIVsPropertyFileOut
)
function CreateNew(
    szFileName : String, 
    nFormatIndex : uint, 
    dwShareMode : uint, 
    dwCreationDisposition : uint, 
    dwFlagsAndAttributes : uint, 
    pIVsStructuredFileIOHelper : IVsStructuredFileIOHelper, 
    szFormatVersion : String, 
    szDescription : String, 
    ppIVsPropertyFileOut : IVsPropertyFileOut
) : int

Parameters

  • szFileName
    Type: System.String

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

  • nFormatIndex
    Type: System.UInt32

    [in] Integer containing the format index.

  • 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.

  • szFormatVersion
    Type: System.String

    [in] Null-terminated string containing the format version.

  • szDescription
    Type: System.String

    [in] Null-terminated string containing the description.

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::CreateNew(
   [in] LPCOLESTR szFileName,
   [in] ULONG nFormatIndex,
   [in] DWORD dwShareMode,
   [in] DWORD dwCreationDisposition,
   [in] DWORD dwFlagsAndAttributes,
   [in] IVsStructuredFileIOHelper *pIVsStructuredFileIOHelper,
   [in] LPCOLESTR szFormatVersion,
   [in] LPCOLESTR szDescription,
   [out] IVsPropertyFileOut **ppIVsPropertyFileOut
);

.NET Framework Security

See Also

Reference

IVsStructuredFileIO Interface

IVsStructuredFileIO Members

Microsoft.VisualStudio.Shell.Interop Namespace