IVsStructuredFileIO.CreateNew 方法

使用格式索引创建新的多格式文件。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
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
)

参数

  • szFileName
    类型:System.String
    [in] 包含文件名的 null 终止的字符串。
  • nFormatIndex
    类型:System.UInt32
    [in] 包含布局索引的整数。
  • dwShareMode
    类型:System.UInt32
    [in] 包含共享模式的双字。
  • dwCreationDisposition
    类型:System.UInt32
    [in] 包含可创建处置的双字。
  • dwFlagsAndAttributes
    类型:System.UInt32
    [in] 包含带有和特性的双字。
  • szFormatVersion
    类型:System.String
    [in] 包含布局版本的 null 终止的字符串。
  • szDescription
    类型:System.String
    [in] 包含描述的 null 终止的字符串。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 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 安全性

请参见

参考

IVsStructuredFileIO 接口

Microsoft.VisualStudio.Shell.Interop 命名空间