IVsPackage.GetAutomationObject 方法

使 VSPackage 参与对自动化对象模型。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
Function GetAutomationObject ( _
    pszPropName As String, _
    <OutAttribute> ByRef ppDisp As Object _
) As Integer
int GetAutomationObject(
    string pszPropName,
    out Object ppDisp
)

参数

  • pszPropName
    类型:System.String
    [in] 为 null 指针已停止包含支柱名称的字符串。
  • ppDisp
    类型:System.Object%
    [out] 为 IDispatch 接口的指针。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell.idl:

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

此方法是可选的和由若要扩展对自动化对象模型的 Vspackage 实现。实质上,使用此方法,可以添加到 DTE 的对象和事件源。

.NET Framework 安全性

请参见

参考

IVsPackage 接口

Microsoft.VisualStudio.Shell.Interop 命名空间