' ########################################################################################
' Microsoft Windows
' File: errorrep.inc
' Contents: Functions used to report errors to Microsoft
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_ErrorRep_PBI)
#DEFINE PBX_ErrorRep_PBI
%EQUATE `ERRORREP_INC = 1
#INCLUDE ONCE "Core/Windows.inc"
' enum tagEFaultRepRetVal
%EQUATE `frrvOk = 0
%EQUATE `frrvOkManifest = 1
%EQUATE `frrvOkQueued = 2
%EQUATE `frrvErr = 3
%EQUATE `frrvErrNoDW = 4
%EQUATE `frrvErrTimeout = 5
%EQUATE `frrvLaunchDebugger = 6
%EQUATE `frrvOkHeadless = 7
%EQUATE `frrvErrAnotherInstance = 8
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION ReportFault LIB "FaultRep.dll" ALIAS "ReportFault" ( BYVAL pep AS EXCEPTION_POINTERS PTR, BYVAL dwOpt AS QUAD ) AS LONG
#ELSE
DECLARE FUNCTION ReportFault LIB "faultrep.dll" ALIAS "ReportFault" ( BYREF pep AS EXCEPTION_POINTERS , BYVAL dwOpt AS QUAD ) AS LONG ' EFaultRepRetVal
#ENDIF
DECLARE FUNCTION AddERExcludedApplication LIB "faultrep.dll" ALIAS "AddERExcludedApplicationA" ( BYREF szApplication AS ASCIIZ ) AS LONG
DECLARE FUNCTION AddERExcludedApplicationW LIB "faultrep.dll" ALIAS "AddERExcludedApplicationW" ( BYREF wszApplication AS WSTRINGZ
 ) AS LONG
'//
'//+++++++++++++++++++++ Hang reporting api ++++++++++++++++++++++++++++++++
'//
DECLARE FUNCTION WerReportHang LIB "faultrep.dll" ALIAS "WerReportHang" ( BYVAL hwndHungApp AS QUAD , OPTIONAL BYREF pwzHungApplicationName AS WSTRINGZ ) AS LONG
#ENDIF
