IVsToolboxDataProvider2.ReconstituteItem Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public:
int ReconstituteItem(System::String ^ lpszCurrentName, System::String ^ lpszID, System::String ^ lpszData, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IDataObject ^ % ppDO, cli::array <Microsoft::VisualStudio::Shell::Interop::TBXITEMINFO> ^ ptif);
int ReconstituteItem(std::wstring const & lpszCurrentName, std::wstring const & lpszID, std::wstring const & lpszData, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IDataObject const & & ppDO, std::Array <Microsoft::VisualStudio::Shell::Interop::TBXITEMINFO> const & ptif);
public int ReconstituteItem (string lpszCurrentName, string lpszID, string lpszData, out Microsoft.VisualStudio.OLE.Interop.IDataObject ppDO, Microsoft.VisualStudio.Shell.Interop.TBXITEMINFO[] ptif);
abstract member ReconstituteItem : string * string * string * IDataObject * Microsoft.VisualStudio.Shell.Interop.TBXITEMINFO[] -> int
Public Function ReconstituteItem (lpszCurrentName As String, lpszID As String, lpszData As String, ByRef ppDO As IDataObject, ptif As TBXITEMINFO()) As Integer
Parameters
- lpszCurrentName
- String
[in] The current (localized) name of the Toolbox item.
- lpszID
- String
[in] The canonical ID of the Toolbox item.
- lpszData
- String
[in] A string containing any extra information needed to reconstitute the item.
- ppDO
- IDataObject
[out] A data object corresponding to the Toolbox item.
- ptif
- TBXITEMINFO[]
[out] A TBXITEMINFO structure containing additional information about the Toolbox item.
Returns
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.