XErrorCallback
A callback that is called if an error occurs in the gaming OS or gaming runtime.Syntax
Parameters
hr _In_Type: HRESULT The HRESULT code associated with the error. msg _In_z_
Type: char* Text description of the error. context _In_
Type: void* Context pointer for the callback.
Return value
Type: bool Returntrue to indicate that the system should continue on and do whatever is specified by XErrorSetOptions; otherwise, return false to ignore the error.
Remarks
Use the XErrorSetCallback function to specify theXErrorCallback callback in your game that the system should call if an error occurs, and the XErrorSetOptions function to specify how the game should behave when an error occurs in the gaming OS or gaming runtime.
The following example illustrates how to set error options, define a custom error callback, and set the custom error callback to receive error notifications by the system.
Requirements
Header: XError.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
XError membersXErrorSetCallback
