IVsToolboxDataProvider2.ReconstituteItem Method
Recreates a Toolbox item from data stored using the settings mechanism when a user chooses to retrieve settings using the Import/Export Settings feature available on the IDE’s Tools menu.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function ReconstituteItem ( _
lpszCurrentName As String, _
lpszID As String, _
lpszData As String, _
<OutAttribute> ByRef ppDO As IDataObject, _
<OutAttribute> ptif As TBXITEMINFO() _
) As Integer
int ReconstituteItem(
string lpszCurrentName,
string lpszID,
string lpszData,
out IDataObject ppDO,
TBXITEMINFO[] ptif
)
int ReconstituteItem(
[InAttribute] String^ lpszCurrentName,
[InAttribute] String^ lpszID,
[InAttribute] String^ lpszData,
[OutAttribute] IDataObject^% ppDO,
[OutAttribute] array<TBXITEMINFO>^ ptif
)
abstract ReconstituteItem :
lpszCurrentName:string *
lpszID:string *
lpszData:string *
ppDO:IDataObject byref *
ptif:TBXITEMINFO[] byref -> int
function ReconstituteItem(
lpszCurrentName : String,
lpszID : String,
lpszData : String,
ppDO : IDataObject,
ptif : TBXITEMINFO[]
) : int
Parameters
lpszCurrentName
Type: String[in] The current (localized) name of the Toolbox item.
lpszID
Type: String[in] The canonical ID of the Toolbox item.
lpszData
Type: String[in] A string containing any extra information needed to reconstitute the item.
ppDO
Type: Microsoft.VisualStudio.OLE.Interop.IDataObject%[out] A data object corresponding to the Toolbox item.
ptif
Type: array<Microsoft.VisualStudio.Shell.Interop.TBXITEMINFO[][out] A TBXITEMINFO structure containing additional information about the Toolbox item.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell80.idl:
HRESULT IVsToolboxDataProvider2::ReconstituteItem(
[in] LPCOLESTR lpszCurrentName,
[in] LPCOLESTR lpszID,
[in] LPCOLESTR lpszData,
[out] IDataObject **ppDO,
[out] TBXITEMINFO *ptif
);
The environment calls IVsToolboxDataProvider2.ReconstituteItem method when a user chooses the import option of the IDE's Import/Export Settings feature.
The input arguments to the IVsToolboxDataProvider2.ReconstituteItem are obtained by the IDE from exported settings, specifically:
The Toolbox item canonical ID (lpszID) was originally exported when the environment called GetItemID.
The current tab name (lpszCurrentName), was originally exported when the environment called GetDisplayName.
Any additional information needed to reconstitute the Toolbox item (lpszData) was originally exported when the environment called GetProfileData.
Each data provider should be able to reconstitute any type of item that it can create.
If a profile imported settings contains an item that no currently installed data provider is able to reconstitute, it is assumed that either the item is a control that is not installed on the current system, or that the data provider that would normally reconstitute that control has not been installed on the system. In either case, a permanently disabled place-holder control is added to the Toolbox to represent the unknown item.
.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.