Execute Method

           

Called when a wizard is launched from either the Add Item or the New Project dialog box.

Syntax

Sub Execute (ByVal Name as Object, hWnd as Long, ContextParams() as Variant, CustomParams() as Variant)

This syntax has these parts:

Part Description
Name A dispatch pointer to the highest level DTE automation object for the Visual Studio environment.
HWnd The hWnd handle for the parent for the wizard dialog box.
ContextParams() An array of elements that vary depending on whether your wizard is launched from the Add Items or the New Project dialog box. See Settings, below, for available values.
CustomParams() An array of user-defined parameters, determined by param= statements in the wizard's .vsz file. Use the parameters passed in this array to customize a single wizard’s behavior to perform multiple tasks.

Settings

The settings for ContextParams are:

Setting Description
WizardType A constant indicating the type of wizard. Either:

vsext_wzk_AddItem

- or -

vsext_wzk_NewProject

ProjectName The Visual Studio project name.
ProjectItems A pointer to the ProjectItems Collection on which the wizard will operate. This is passed to the wizard based on the project hierarchy selection.

Valid for AddItem wizards only.

LocalDirectory The local location where the wizard's working project files exist.
ItemName The name of the item that is to be added. This is file name that the user types in (or accepted default) from the Add-Items dialog. Based on the Flags set in the VSDIR file, this may be null.

Valid for AddItem wizards only.

Fexclusive A boolean indicating whether the project should be added to the current solution, or whether the system should close the current solution, create a new one, and then add the project

Valid for NewProject wizards only.

InstallationDirectory The directory path where Visual Studio is installed.