Retrieves the error mode for the current process
#include <WinAPIDiag.au3> _WinAPI_GetErrorMode ( )
This function requires Windows Vista or later.
Search GetErrorMode in MSDN Library.