다음을 통해 공유


IVsExtensibleObject.GetAutomationObject(String, Object) Method

Definition

Returns an automation object.

public:
 int GetAutomationObject(System::String ^ pszPropName, [Runtime::InteropServices::Out] System::Object ^ % ppDisp);
int GetAutomationObject(std::wstring const & pszPropName, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & ppDisp);
public int GetAutomationObject (string pszPropName, out object ppDisp);
abstract member GetAutomationObject : string * obj -> int
Public Function GetAutomationObject (pszPropName As String, ByRef ppDisp As Object) As Integer

Parameters

pszPropName
String

[in] The environment passes a null when an automation consumer calls your automation object.

ppDisp
Object

[out] Pointer to the IDispatch interface of the object to be returned.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

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

The environment calls this method when an automation consumer tries to use your the automation object of your VSPackage.

See illustrations of the implementation of this interface in the Basic Edit Sample.

Applies to