Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SetRestrictedErrorInfo function

Sets the restricted error information object for the current thread.

Syntax


HRESULT WINAPI SetRestrictedErrorInfo(
  _In_  IRestrictedErrorInfo *pRestrictedErrorInfo
);

Parameters

pRestrictedErrorInfo [in]

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.

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Roerrorapi.h

See also

IRestrictedErrorInfo
RoCaptureErrorContext
RoFailFastWithErrorContext
SetErrorInfo
RO_ERROR_REPORTING_FLAGS

 

 

Community Additions

Show:
© 2014 Microsoft