Partager via


IVsPackage.GetAutomationObject Method

Enables a VSPackage to participate in the DTE automation object model.

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

Syntax

'Déclaration
Function GetAutomationObject ( _
    pszPropName As String, _
    <OutAttribute> ByRef ppDisp As Object _
) As Integer
'Utilisation
Dim instance As IVsPackage
Dim pszPropName As String
Dim ppDisp As Object
Dim returnValue As Integer

returnValue = instance.GetAutomationObject(pszPropName, _
    ppDisp)
int GetAutomationObject(
    string pszPropName,
    out Object ppDisp
)
int GetAutomationObject(
    [InAttribute] String^ pszPropName, 
    [OutAttribute] Object^% ppDisp
)
function GetAutomationObject(
    pszPropName : String, 
    ppDisp : Object
) : int

Parameters

  • pszPropName
    Type: System.String

    [in] Pointer to a null terminated string containing the prop name.

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

HRESULT IVsPackage::GetAutomationObject(
   [in] LPCOLESTR pszPropName,
   [out] IDispatch **ppDisp
);

This method is optional and is implemented by VSPackages that want to extend the DTE Automation object model. Essentially, you can add objects to the DTE and event sources using this method.

Permissions

See Also

Reference

IVsPackage Interface

IVsPackage Members

Microsoft.VisualStudio.Shell.Interop Namespace