20 #include <winpr/config.h>
22 #include <winpr/error.h>
30 UINT GetErrorMode(
void)
35 UINT SetErrorMode(UINT uMode)
40 DWORD GetLastError(VOID)
42 PTEB pt = NtCurrentTeb();
45 return pt->LastErrorValue;
47 return ERROR_OUTOFMEMORY;
50 VOID SetLastError(DWORD dwErrCode)
52 PTEB pt = NtCurrentTeb();
55 pt->LastErrorValue = dwErrCode;
59 VOID RestoreLastError(DWORD dwErrCode)
63 VOID RaiseException(DWORD dwExceptionCode, DWORD dwExceptionFlags, DWORD nNumberOfArguments,
64 CONST ULONG_PTR* lpArguments)
68 LONG UnhandledExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo)
73 LPTOP_LEVEL_EXCEPTION_FILTER
74 SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter)
79 PVOID AddVectoredExceptionHandler(ULONG First, PVECTORED_EXCEPTION_HANDLER Handler)
84 ULONG RemoveVectoredExceptionHandler(PVOID Handle)
89 PVOID AddVectoredContinueHandler(ULONG First, PVECTORED_EXCEPTION_HANDLER Handler)
94 ULONG RemoveVectoredContinueHandler(PVOID Handle)