IVsToolbox.AddActiveXItem Method
Allows ActiveX controls to be programmatically added to the Toolbox.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function AddActiveXItem ( _
ByRef clsid As Guid, _
lpszTab As String, _
pHierarchy As IVsHierarchy _
) As Integer
int AddActiveXItem(
ref Guid clsid,
string lpszTab,
IVsHierarchy pHierarchy
)
int AddActiveXItem(
[InAttribute] Guid% clsid,
[InAttribute] String^ lpszTab,
[InAttribute] IVsHierarchy^ pHierarchy
)
abstract AddActiveXItem :
clsid:Guid byref *
lpszTab:string *
pHierarchy:IVsHierarchy -> int
function AddActiveXItem(
clsid : Guid,
lpszTab : String,
pHierarchy : IVsHierarchy
) : int
Parameters
- clsid
Type: System.Guid%
[in] Class identifier defining the ActiveX control to add to the Toolbox.
- lpszTab
Type: System.String
[[in] The localized name of the tab to add the ActiveX control to. The localized name can be obtained from the invariant non-localized name by calling GetIDOfTab
- pHierarchy
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
[in] Not implemented.
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 vsshell.idl:
HRESULT IVsToolbox::AddActiveXItem(
[in]REFCLSID clsid,
[in]LPCOLESTR lpszTab,
[in]IVsHierarchy *pHierarchy
);
The Toolbox is a collection of tabs and each tab has a collection of items on it. The items on the tab are an IDataObject, which is the object used to pass information through the clipboard or through OLE. The Toolbox's default data provider of the Toolbox is an ActiveX data provider. To add a non-ActiveX item to the Toolbox, use AddItem.
.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.