IVsPropertyPageFrame.ReportError Method
Reports a COM (HRESULT) error.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'宣言
Function ReportError ( _
hrErr As Integer _
) As Integer
'使用
Dim instance As IVsPropertyPageFrame
Dim hrErr As Integer
Dim returnValue As Integer
returnValue = instance.ReportError(hrErr)
int ReportError(
int hrErr
)
int ReportError(
int hrErr
)
function ReportError(
hrErr : int
) : int
Parameters
hrErr
Type: System.Int32[in] An HRESULT.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
Use this method instead of ReportErrorInfo if the error comes from one of this interface's methods.
Using this method prevents displaying duplicate errors. The method shows the error only if the component supports IErrorInfo. Thus components that do not implement IErrorInfo that put up their own errors and return E_FAIL, won't show two error messages.
COM Signature
From vsshell.idl:
[C++]
HRESULT IVsPropertyPageFrame::ReportError(
HRESULT hrErr
);
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.