This documentation is archived and is not being maintained.

IVsPackage.GetAutomationObject Method

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

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int GetAutomationObject (
	[InAttribute] string pszPropName,
	out Object ppDisp
)
int GetAutomationObject (
	/** @attribute InAttribute() */ String pszPropName, 
	/** @attribute OutAttribute() */ /** @ref */ Object ppDisp
)
JScript does not support passing value-type arguments by reference.

Parameters

pszPropName

[in] Pointer to a null terminated string containing the prop name.

ppDisp

[out] Pointer to the IDispatch interface.

Return Value

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

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.

Show: