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
)
function AddNewWebItem(
itemidLoc : uint,
dwAddItemOperation : VSADDITEMOPERATION,
pszItemName : String,
pszFileTemplate : String,
options : uint,
pszSelectedLanguage : String,
hwndDlgOwner : IntPtr,
pResult : VSADDRESULT[]
) : int
Parameters
itemidLoc
Type: System.UInt32[in] Folder to add the item to
dwAddItemOperation
Type: Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION[in] VSADDITEMOP_RUNWIZARD are valid
pszItemName
Type: System.String[in] Name of the item
pszFileTemplate
Type: System.String[in] Path to the template the user selected
- options
Type: System.UInt32
pszSelectedLanguage
Type: System.String[in] String selected from the languages dropdown (can be null)
hwndDlgOwner
Type: System.IntPtr[in]
pResult
Type: [][out]
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
);
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.