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.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'宣告
Private Function GetAutomationObject ( _
propName As String, _
<OutAttribute> ByRef auto As Object _
) As Integer Implements IVsPackage.GetAutomationObject
int IVsPackage.GetAutomationObject(
string propName,
out Object auto
)
Parameters
- propName
Type: System.String
String containing the automation property name.
- auto
Type: System.Object%
[out] Returns the automation object.
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: <Category>.<Name>. If the options page has this format and indicates that it supports automation, its automation object will be returned.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.