Share via


IVsWebProject.AddNewWebItem Method

Definition

Adds a new Web item to the project.

public:
 int AddNewWebItem(System::UInt32 itemidLoc, Microsoft::VisualStudio::Shell::Interop::VSADDITEMOPERATION dwAddItemOperation, System::String ^ pszItemName, System::String ^ pszFileTemplate, System::UInt32 options, System::String ^ pszSelectedLanguage, IntPtr hwndDlgOwner, cli::array <Microsoft::VisualStudio::Shell::Interop::VSADDRESULT> ^ pResult);
public int AddNewWebItem (uint itemidLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION dwAddItemOperation, string pszItemName, string pszFileTemplate, uint options, string pszSelectedLanguage, IntPtr hwndDlgOwner, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] pResult);
abstract member AddNewWebItem : uint32 * Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION * string * string * uint32 * string * nativeint * Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] -> int
Public Function AddNewWebItem (itemidLoc As UInteger, dwAddItemOperation As VSADDITEMOPERATION, pszItemName As String, pszFileTemplate As String, options As UInteger, pszSelectedLanguage As String, hwndDlgOwner As IntPtr, pResult As VSADDRESULT()) As Integer

Parameters

itemidLoc
UInt32

[in] Folder to which the item is to be added.

dwAddItemOperation
VSADDITEMOPERATION

[in] Add item operation. Only VSADDITEMOP_CLONEFILE and VSADDITEMOP_RUNWIZARD are valid

pszItemName
String

[in] Name of the item.

pszFileTemplate
String

[in] Path to the template the user selected.

options
UInt32

[in] The options checked on the dialog for the item.

pszSelectedLanguage
String

[in] String selected from the languages dropdown (can be null).

hwndDlgOwner
IntPtr

nativeint

[in] Handle to the Add New Web Item dialog.

pResult
VSADDRESULT[]

[out] Pointer to the VSADDRESULT enumeration indicating whether the item was successfully added to the project.

Returns

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  
);  

Applies to