IVstaProjectHostItemCollection.AddProjectHostItem Method (String, String, String, String, String)
Adds a new host item to the project based on the specified host item information, and generates code for the new host item.
Namespace: Microsoft.VisualStudio.Tools.Applications.DesignTime.Interop
Assembly: Microsoft.VisualStudio.Tools.Applications.DesignTime.v9.0 (in Microsoft.VisualStudio.Tools.Applications.DesignTime.v9.0.dll)
Syntax
'Declaration
Function AddProjectHostItem ( _
name As String, _
baseType As String, _
interfaceType As String, _
cookie As String, _
templatePath As String _
) As IVstaProjectHostItem
'Usage
Dim instance As IVstaProjectHostItemCollection
Dim name As String
Dim baseType As String
Dim interfaceType As String
Dim cookie As String
Dim templatePath As String
Dim returnValue As IVstaProjectHostItem
returnValue = instance.AddProjectHostItem(name, _
baseType, interfaceType, cookie, _
templatePath)
IVstaProjectHostItem AddProjectHostItem(
string name,
string baseType,
string interfaceType,
string cookie,
string templatePath
)
IVstaProjectHostItem^ AddProjectHostItem(
String^ name,
String^ baseType,
String^ interfaceType,
String^ cookie,
String^ templatePath
)
function AddProjectHostItem(
name : String,
baseType : String,
interfaceType : String,
cookie : String,
templatePath : String
) : IVstaProjectHostItem
Parameters
name
Type: System.StringThe identifier of the host item to add.
baseType
Type: System.StringThe fully qualified name of the base proxy class of the host item.
interfaceType
Type: System.StringThe fully qualified name of the Visual Studio Tools for Applications base runtime interface.
cookie
Type: System.StringThe name that identifies a unique instance of a project host item.
templatePath
Type: System.StringThe full path of the host item template file excluding the file name extension.
Return Value
Type: Microsoft.VisualStudio.Tools.Applications.DesignTime.Interop.IVstaProjectHostItem
The new host item object that was added to the project.
.NET Framework Security
- 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.
See Also
Reference
IVstaProjectHostItemCollection Interface
IVstaProjectHostItemCollection Members
Microsoft.VisualStudio.Tools.Applications.DesignTime.Interop Namespace