共用方式為


Package.IVsPackage.GetAutomationObject(String, Object) Method

Definition

Gets an automation-friendly object for this package.

 virtual int Microsoft.VisualStudio.Shell.Interop.IVsPackage.GetAutomationObject(System::String ^ propName, [Runtime::InteropServices::Out] System::Object ^ % auto) = Microsoft::VisualStudio::Shell::Interop::IVsPackage::GetAutomationObject;
int Microsoft.VisualStudio.Shell.Interop.IVsPackage.GetAutomationObject(std::wstring const & propName, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & auto);
int IVsPackage.GetAutomationObject (string propName, out object auto);
abstract member Microsoft.VisualStudio.Shell.Interop.IVsPackage.GetAutomationObject : string * obj -> int
override this.Microsoft.VisualStudio.Shell.Interop.IVsPackage.GetAutomationObject : string * obj -> int
Function GetAutomationObject (propName As String, ByRef auto As Object) As Integer Implements IVsPackage.GetAutomationObject

Parameters

propName
String

String containing the automation property name.

auto
Object

[out] Returns the automation object.

Returns

If the method succeeds, S_OK, otherwise an error code.

Implements

Remarks

The default implementation will return auto as null if propName is null, indicating that there is no default automation object. If propName is non-null, 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.

Applies to