IVsToolboxDataProvider2::GetProfileData Method (IDataObject^, String^)

 

Obtains any extra information, if needed, about a Toolbox item which can be saved through the settings mechanism using the Import/Export Settings feature available on the IDE’ Tools menu.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

int GetProfileData(
	IDataObject^ pDO,
	[OutAttribute] String^% pbstrData
)

Parameters

pDO
Type: Microsoft.VisualStudio.OLE.Interop::IDataObject^

[in] The data object corresponding to the Toolbox item.

pbstrData
Type: System::String^

[out] A string containing all the extra information that would be needed to reconstitute the item when imported from Settings.

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::GetProfileData(
   [in] IDataObject *pDO,
   [out] BSTR *pbstrData
);

The environment calls IVsToolboxDataProvider2.GetProfileData when a user chooses the export option of the IDE's Import/Export Settings feature.

On settings import, the environment will retrieve that information and pass it to the ReconstituteItem method to recreate the Toolbox item.

Information provided by IVsToolboxDataProvider2.GetProfileData must be:

  • Sufficient to identify the original control used by the item and add it to the Toolbox.

  • Portable and non-localized, so that it can be transferred between instances of Visual Studio using the IDE's Import/Export Settings feature.

For more information on using the vssettings mechanism, see State Persistence and the Visual Studio IDE.

System_CAPS_noteNote

Settings will not install the control on the system if the control is not already present.

Return to top
Show: