Share via


Fonction SetRestrictedErrorInfo (roerrorapi.h)

Définit l’objet d’informations d’erreur restreint pour le thread actif.

Syntaxe

HRESULT SetRestrictedErrorInfo(
  [in] IRestrictedErrorInfo *pRestrictedErrorInfo
);

Paramètres

[in] pRestrictedErrorInfo

Objet d’informations d’erreur restreint associé au thread actif.

Valeur retournée

Si cette fonction réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT.

Remarques

Appelez la fonction RoCaptureErrorContext pour enregistrer les informations d’erreur pour le thread actuel dans une application du Windows Store. Appelez la fonction RoFailFastWithErrorContext pour lever une exception, arrêter le processus en cours et signaler l’erreur au service Rapport d'erreurs Windows (WER).

La fonction SetRestrictedErrorInfo appelle QueryInterface pour rechercher l’objet IErrorInfo , puis appelle SetErrorInfo. L’appel échoue si IRestrictedErrorInfo n’est pas l’implémentation système. Pour créer un objet IRestrictedErrorInfo , appelez les fonctions OriginateError, TransformError ou RoCaptureErrorContext .

La fonction SetRestrictedErrorInfo libère l’objet d’informations d’erreur restreint existant, le cas échéant, et définit pRestrictedErrorInfo. Pour plus d’informations, consultez la fonction SetErrorInfo .

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows 8 [applications de bureau | Applications UWP]
Serveur minimal pris en charge Windows Server 2012 [applications de bureau | Applications UWP]
Plateforme cible Windows
En-tête roerrorapi.h
Bibliothèque RuntimeObject.lib
DLL ComBase.dll

Voir aussi

IRestrictedErrorInfo

RO_ERROR_REPORTING_FLAGS

RoCaptureErrorContext

RoFailFastWithErrorContext

SetErrorInfo