Share via


IVsToolboxDataProvider2.GetProfileData Method

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)

Syntax

'Declaration
Function GetProfileData ( _
    pDO As IDataObject, _
    <OutAttribute> ByRef pbstrData As String _
) As Integer
int GetProfileData(
    IDataObject pDO,
    out string pbstrData
)
int GetProfileData(
    [InAttribute] IDataObject^ pDO, 
    [OutAttribute] String^% pbstrData
)
abstract GetProfileData : 
        pDO:IDataObject * 
        pbstrData:string byref -> int 
function GetProfileData(
    pDO : IDataObject, 
    pbstrData : String
) : int

Parameters

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

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.

.NET Framework Security

See Also

Reference

IVsToolboxDataProvider2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace