IVsToolboxDataProvider2::ReconstituteItem Method (String^, String^, String^, IDataObject^, array<TBXITEMINFO>^)

 

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)

int ReconstituteItem(
	String^ lpszCurrentName,
	String^ lpszID,
	String^ lpszData,
	[OutAttribute] IDataObject^% ppDO,
	array<TBXITEMINFO>^ ptif
)

Parameters

lpszCurrentName
Type: System::String^

[in] The current (localized) name of the Toolbox item.

lpszID
Type: System::String^

[in] The canonical ID of the Toolbox item.

lpszData
Type: System::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: System::Int32

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

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.

Return to top
Show: