共用方式為


IVsWebProject.AddNewWebItem Method

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

Syntax

'宣告
Function AddNewWebItem ( _
    itemidLoc As UInteger, _
    dwAddItemOperation As VSADDITEMOPERATION, _
    pszItemName As String, _
    pszFileTemplate As String, _
    options As UInteger, _
    pszSelectedLanguage As String, _
    hwndDlgOwner As IntPtr, _
    <OutAttribute> pResult As VSADDRESULT() _
) As Integer
'用途
Dim instance As IVsWebProject
Dim itemidLoc As UInteger
Dim dwAddItemOperation As VSADDITEMOPERATION
Dim pszItemName As String
Dim pszFileTemplate As String
Dim options As UInteger
Dim pszSelectedLanguage As String
Dim hwndDlgOwner As IntPtr
Dim pResult As VSADDRESULT()
Dim returnValue As Integer

returnValue = instance.AddNewWebItem(itemidLoc, _
    dwAddItemOperation, pszItemName, _
    pszFileTemplate, options, pszSelectedLanguage, _
    hwndDlgOwner, pResult)
int AddNewWebItem(
    uint itemidLoc,
    VSADDITEMOPERATION dwAddItemOperation,
    string pszItemName,
    string pszFileTemplate,
    uint options,
    string pszSelectedLanguage,
    IntPtr hwndDlgOwner,
    VSADDRESULT[] pResult
)
int AddNewWebItem(
    [InAttribute] unsigned int itemidLoc, 
    [InAttribute] VSADDITEMOPERATION dwAddItemOperation, 
    [InAttribute] String^ pszItemName, 
    [InAttribute] String^ pszFileTemplate, 
    [InAttribute] unsigned int options, 
    [InAttribute] String^ pszSelectedLanguage, 
    [InAttribute] IntPtr hwndDlgOwner, 
    [OutAttribute] array<VSADDRESULT>^ pResult
)
abstract AddNewWebItem : 
        itemidLoc:uint32 * 
        dwAddItemOperation:VSADDITEMOPERATION * 
        pszItemName:string * 
        pszFileTemplate:string * 
        options:uint32 * 
        pszSelectedLanguage:string * 
        hwndDlgOwner:IntPtr * 
        pResult:VSADDRESULT[] byref -> int 
function AddNewWebItem(
    itemidLoc : uint, 
    dwAddItemOperation : VSADDITEMOPERATION, 
    pszItemName : String, 
    pszFileTemplate : String, 
    options : uint, 
    pszSelectedLanguage : String, 
    hwndDlgOwner : IntPtr, 
    pResult : VSADDRESULT[]
) : int

Parameters

  • pszFileTemplate
    Type: System.String
    [in] Path to the template the user selected
  • pszSelectedLanguage
    Type: System.String
    [in] String selected from the languages dropdown (can be null)

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 vsshell80.idl:

HRESULT IVsWebProject::AddNewWebItem(
   [in] VSITEMID itemidLoc, 
   [in] VSADDITEMOPERATION dwAddItemOperation, 
   [in] LPCOLESTR pszItemName, 
   [in] LPCOLESTR pszFileTemplate, 
   [in] VSADDNEWWEBITEMOPTIONS options, 
   [in] LPCOLESTR pszSelectedLanguage, 
   [in] HWND hwndDlgOwner, 
   [out, retval] VSADDRESULT * pResult
);

.NET Framework Security

See Also

Reference

IVsWebProject Interface

IVsWebProject Members

Microsoft.VisualStudio.Shell.Interop Namespace