IVsPropertyPageFrame.ReportError 方法

报告 COM (hresult) 错误。

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

语法

声明
Function ReportError ( _
    hrErr As Integer _
) As Integer
int ReportError(
    int hrErr
)

参数

返回值

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

备注

,如果错误来自此接口的方法之一,请使用此方法而不是 ReportErrorInfo

使用此方法将阻止显示重复错误。,仅当元素支持 IErrorInfo,方法显示错误。这样就不实现 IErrorInfo 提升其错误并返回 E_FAIL的元素,不会显示两条错误消息。

COM 签名

从 vsshell.idl:

[C++]

HRESULT IVsPropertyPageFrame::ReportError(
   HRESULT hrErr
);

.NET Framework 安全性

请参见

参考

IVsPropertyPageFrame 接口

Microsoft.VisualStudio.Shell.Interop 命名空间