Debian Codegraph @

mingw-w64-headers/include/errhandlingapi.h

raw
1 /**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5 #ifndef _ERRHANDLING_H_
6 #define _ERRHANDLING_H_
7
8 #include <apiset.h>
9 #include <apisetcconv.h>
10 #include <minwindef.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
17 typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER) (struct _EXCEPTION_POINTERS *ExceptionInfo);
18 typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
19 WINBASEAPI LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter (LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
20 #endif /* WINAPI_PARTITION_APP */
21 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || defined(WINSTORECOMPAT)
22 WINBASEAPI LONG WINAPI UnhandledExceptionFilter (struct _EXCEPTION_POINTERS *ExceptionInfo);
23 #endif
24 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
25 WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler (ULONG First, PVECTORED_EXCEPTION_HANDLER Handler);
26 WINBASEAPI ULONG WINAPI RemoveVectoredExceptionHandler (PVOID Handle);
27 WINBASEAPI PVOID WINAPI AddVectoredContinueHandler (ULONG First, PVECTORED_EXCEPTION_HANDLER Handler);
28 WINBASEAPI ULONG WINAPI RemoveVectoredContinueHandler (PVOID Handle);
29
30 #if !defined (RC_INVOKED) && defined (WINBASE_DECLARE_RESTORE_LAST_ERROR)
31 WINBASEAPI VOID WINAPI RestoreLastError (DWORD dwErrCode);
32
33 typedef VOID (WINAPI *PRESTORE_LAST_ERROR) (DWORD);
34
35 #define RESTORE_LAST_ERROR_NAME_A "RestoreLastError"
36 #define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError"
37 #define RESTORE_LAST_ERROR_NAME TEXT ("RestoreLastError")
38 #endif
39
40 #endif
41
42 #if _WIN32_WINNT >= 0x0600 && (WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= NTDDI_WIN10_VB)
43 WINBASEAPI UINT WINAPI GetErrorMode (VOID);
44 #endif
45
46 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
47 WINBASEAPI VOID WINAPI RaiseException (DWORD dwExceptionCode, DWORD dwExceptionFlags, DWORD nNumberOfArguments, CONST ULONG_PTR *lpArguments);
48 WINBASEAPI UINT WINAPI SetErrorMode (UINT uMode);
49 WINBASEAPI DWORD WINAPI GetLastError (VOID);
50 WINBASEAPI VOID WINAPI SetLastError (DWORD dwErrCode);
51 #endif
52
53 #ifdef __cplusplus
54 }
55 #endif
56 #endif