Share via


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
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
)
abstract CreateNew : 
        szFileName:string * 
        nFormatIndex:uint32 * 
        dwShareMode:uint32 * 
        dwCreationDisposition:uint32 * 
        dwFlagsAndAttributes:uint32 * 
        pIVsStructuredFileIOHelper:IVsStructuredFileIOHelper * 
        szFormatVersion:string * 
        szDescription:string * 
        ppIVsPropertyFileOut:IVsPropertyFileOut byref -> int
function CreateNew(
    szFileName : String, 
    nFormatIndex : uint, 
    dwShareMode : uint, 
    dwCreationDisposition : uint, 
    dwFlagsAndAttributes : uint, 
    pIVsStructuredFileIOHelper : IVsStructuredFileIOHelper, 
    szFormatVersion : String, 
    szDescription : String, 
    ppIVsPropertyFileOut : IVsPropertyFileOut
) : int

Parameters

  • szFileName
    Type: String

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

  • nFormatIndex
    Type: UInt32

    [in] Integer containing the format index.

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

  • szFormatVersion
    Type: String

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

  • szDescription
    Type: String

    [in] Null-terminated string containing the description.

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

Microsoft.VisualStudio.Shell.Interop Namespace