BOOL My_FatalAppExitW() { UINT uAction=NULL; LPCWSTR lpMessageText=NULL; DWORD error_Real = 0; DWORD error_Intercepted = 0; disableInterception(); FatalAppExitW (uAction,lpMessageText); error_Real = GetLastError(); enableInterception(); FatalAppExitW (uAction,lpMessageText); error_Intercepted = GetLastError(); return (error_Real == error_Intercepted); }
void RtlAssert(BOOL InAssert,LPCWSTR lpMessageText) { if(InAssert) return; #ifdef _DEBUG DebugBreak(); #endif FatalAppExitW(0, lpMessageText); }
/* * @unimplemented */ VOID WINAPI FatalAppExitA(UINT uAction, LPCSTR lpMessageText) { UNICODE_STRING MessageTextU; ANSI_STRING MessageText; RtlInitAnsiString(&MessageText, (LPSTR)lpMessageText); RtlAnsiStringToUnicodeString(&MessageTextU, &MessageText, TRUE); FatalAppExitW(uAction, MessageTextU.Buffer); RtlFreeUnicodeString(&MessageTextU); }
extern "C" void _assert() { FatalAppExitW(0, L"assertion failed"); FatalExit(0); }
extern "C" int __cdecl _purecall() { FatalAppExitW(0, L"pure virtual call"); FatalExit(0); return 0; }