Partager via


Package.IVsPackage.GetAutomationObject Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Gets an automation-friendly object for this package.

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

Syntax

'Declaration
Private Function GetAutomationObject ( _
    propName As String, _
    <OutAttribute> ByRef auto As Object _
) As Integer Implements IVsPackage.GetAutomationObject
int IVsPackage.GetAutomationObject(
    string propName,
    out Object auto
)
private:
virtual int GetAutomationObject(
    String^ propName, 
    [OutAttribute] Object^% auto
) sealed = IVsPackage::GetAutomationObject
private abstract GetAutomationObject : 
        propName:string * 
        auto:Object byref -> int  
private override GetAutomationObject : 
        propName:string * 
        auto:Object byref -> int
JScript does not support explicit interface implementations.

Parameters

  • propName
    Type: String

    String containing the automation property name.

  • auto
    Type: Object%

    [out] Returns the automation object.

Return Value

Type: Int32
If the method succeeds, S_OK, otherwise an error code.

Implements

IVsPackage.GetAutomationObject(String, Object%)

Remarks

The default implementation will return auto as nulla null reference (Nothing in Visual Basic) if propName is nulla null reference (Nothing in Visual Basic), indicating that there is no default automation object. If propName is non-nulla null reference (Nothing in Visual Basic), it will walk the metadata attributes searching for an options page that has a name of the format: &lt;Category&gt;.&lt;Name&gt;. If the options page has this format and indicates that it supports automation, its automation object will be returned.

.NET Framework Security

See Also

Reference

Package Class

Microsoft.VisualStudio.Shell Namespace