SetRestrictedErrorInfo function (roerrorapi.h)
Sets the restricted error information object for the current thread.
Syntax
HRESULT SetRestrictedErrorInfo(
[in] IRestrictedErrorInfo *pRestrictedErrorInfo
);
Parameters
[in] pRestrictedErrorInfo
The restricted error information object associated with the current thread.
Return value
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Call the RoCaptureErrorContext function to save error information for the current thread in a Windows Store app. Call the RoFailFastWithErrorContext function to raise an exception, terminate the current process, and report the error to the Windows Error Reporting service (WER).
The SetRestrictedErrorInfo function calls QueryInterface to find the IErrorInfo object, and then it calls SetErrorInfo. The call fails if IRestrictedErrorInfo isn't the system implementation. To create an IRestrictedErrorInfo object, call the OriginateError, TransformError, or RoCaptureErrorContext functions.
The SetRestrictedErrorInfo function releases the existing restricted error information object, if one exists, and sets pRestrictedErrorInfo. For more info, see the SetErrorInfo function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | roerrorapi.h |
Library | RuntimeObject.lib |
DLL | ComBase.dll |