Partager via


IVsAddToolboxItems.AddItemWithOwningPackage Method

Definition

Adds an item to the toolbox with a reference to an owning package.

public:
 int AddItemWithOwningPackage(Microsoft::VisualStudio::OLE::Interop::IDataObject ^ pDO, cli::array <Microsoft::VisualStudio::Shell::Interop::TBXITEMINFO> ^ ptif, System::String ^ szItemID, System::String ^ lpszTab, Guid % guidPkg);
public int AddItemWithOwningPackage (Microsoft.VisualStudio.OLE.Interop.IDataObject pDO, Microsoft.VisualStudio.Shell.Interop.TBXITEMINFO[] ptif, string szItemID, string lpszTab, ref Guid guidPkg);
abstract member AddItemWithOwningPackage : Microsoft.VisualStudio.OLE.Interop.IDataObject * Microsoft.VisualStudio.Shell.Interop.TBXITEMINFO[] * string * string * Guid -> int
Public Function AddItemWithOwningPackage (pDO As IDataObject, ptif As TBXITEMINFO(), szItemID As String, lpszTab As String, ByRef guidPkg As Guid) As Integer

Parameters

pDO
IDataObject

[in] The IDataObject to be added to the tab in the Toolbox.

ptif
TBXITEMINFO[]

[in] A TBXITEMINFO structure identifying item characteristics, such as the item name and icon.

szItemID
String

[in] The item ID string.

lpszTab
String

[[in] The localized name of the tab to which to add the item. The localized name can be obtained from the invariant non-localized name by calling GetIDOfTab(String, String)

guidPkg
Guid

The GUID that identifies the package to associate with the item.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Applies to