Udostępnij za pośrednictwem


IVsPackage.GetAutomationObject(String, Object) Method

Definition

Enables a VSPackage to participate in the DTE automation object model.

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] Pointer to a null terminated string containing the prop name.

ppDisp
Object

[out] Pointer to the IDispatch interface.

Returns

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

Remarks

COM Signature

From vsshell.idl:

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

This method is optional and is implemented by VSPackages that want to extend the DTE Automation object model. Essentially, you can add objects to the DTE and event sources using this method.

Applies to