Compartilhar via


IVsToolboxDataProvider2.GetProfileData(IDataObject, String) Method

Definition

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.

public:
 int GetProfileData(Microsoft::VisualStudio::OLE::Interop::IDataObject ^ pDO, [Runtime::InteropServices::Out] System::String ^ % pbstrData);
int GetProfileData(Microsoft::VisualStudio::OLE::Interop::IDataObject const & pDO, [Runtime::InteropServices::Out] std::wstring const & & pbstrData);
public int GetProfileData (Microsoft.VisualStudio.OLE.Interop.IDataObject pDO, out string pbstrData);
abstract member GetProfileData : Microsoft.VisualStudio.OLE.Interop.IDataObject * string -> int
Public Function GetProfileData (pDO As IDataObject, ByRef pbstrData As String) As Integer

Parameters

pDO
IDataObject

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

pbstrData
String

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

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::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.

Note

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

Applies to