Context Parameters for Launching Wizards
Context parameters provide information required to launch a wizard, such as the type of wizard to be used, the name of the project, directories for wizard items, and so forth.
There are three different types of wizards:
NewProject — Adds a new project to a solution.
AddSubProject — Adds a subproject to an existing project.
AddItem — Adds an item to an existing project.
All three types of wizards are invoked by using the Execute method of the IDTWizard interface. One required parameter of the Execute method is ContextParams. Each type requires a different set of ContextParams values in the correct order as outlined in the following table:
The following table lists all of the context parameters and their descriptions.
A constant indicating the type of wizard. There are three types:
The name of the project.
A pointer to the ProjectItems collection on which the wizard will operate. This is passed to the wizard based on the project hierarchy selection.
The location on the local system where the wizard's working project files are stored.
The name of the item to be added. ItemName is the file name that the user types (or that is accepted by default) in the Add Item dialog box. Depending upon the flags set in the VSDIR file, this setting might be NULL.
The directory path where Visual Studio is installed.
A Boolean value indicating whether the project should be exclusive unto itself. That is, either the project is added to the current solution, or the system closes the current solution, creates a new one, and then adds the project to it.
The name for the solution file without the directory portion or .sln extension. (The .suo file name is also based on this root name.) If SolutionName contains a value (that is, if it is not an empty string), the NewProject wizard calls Create before adding the project with AddFromTemplate. If SolutionName is an empty string, however, you do not need to call Createbefore calling AddFromTemplate.
A Boolean value indicating whether the wizard should run silently, without displaying a user interface (UI), taking all of the default values. The default value for Silent is True.