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
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'Déclaration
Private Function GetAutomationObject ( _
    propName As String, _
    <OutAttribute> ByRef auto As Object _
) As Integer Implements IVsPackage.GetAutomationObject
'Utilisation
Dim instance As Package
Dim propName As String
Dim auto As Object
Dim returnValue As Integer

returnValue = CType(instance, IVsPackage).GetAutomationObject(propName, _
    auto)
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: System.String
    String containing the automation property name.

Return Value

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

Package Members

Microsoft.VisualStudio.Shell Namespace