18#undef OutputDebugString
20#define DBGRPT_MAX_BUFFER_SIZE 4096
21#define DBGRPT_ASSERT_PREFIX_MESSAGE "Assertion failed: "
22#define DBGRPT_ASSERT_PREFIX_NOMESSAGE "Assertion failed!"
23#define DBGRPT_STRING_TOO_LONG "_CrtDbgReport: String too long"
47template <
typename char_t>
85 L"\n\n(Press Retry to debug the application)";
92 L"\n\n(Press Retry to debug the application)";
147template <
typename char_t>
153 wchar_t LineBuffer[20] = {0};
157 if (moduleName && !moduleName[0])
162 _itow(linenumber, LineBuffer, 10);
165 traits::szAssertionMessage,
167 moduleName ?
L"\nModule: " :
L"", moduleName ? moduleName : traits::szEmptyString,
169 LineBuffer[0] ?
L"\nLine: " :
L"", LineBuffer[0] ? LineBuffer :
L"",
182 return messageBox(
NULL, szCompleteMessage,
L"ReactOS C++ Runtime Library",
186template <
typename char_t>
198 char LineBuffer[20] = {0};
200 _itoa(linenumber, LineBuffer, 10);
225template <
typename char_t>
227 const char_t *
filename,
int linenumber,
const char_t *moduleName)
239 traits::OutputDebugString(szCompleteMessage);
292 strcat(szCompleteMessage, szFormatted);
302 strcat(szCompleteMessage,
"\r");
303 strcat(szCompleteMessage,
"\n");
344 wcscat(szCompleteMessage, szFormatted);
354 wcscat(szCompleteMessage,
L"\r");
355 wcscat(szCompleteMessage,
L"\n");
char * strcat(char *DstString, const char *SrcString)
char * strcpy(char *DstString, const char *SrcString)
int __cdecl raise(int _SigNum)
#define _CRTDBG_MODE_DEBUG
#define _CRTDBG_MODE_WNDW
#define _CRTDBG_MODE_FILE
#define _CRT_WIDE(_String)
static HMODULE _CrtUser32Handle
#define DBGRPT_MAX_BUFFER_SIZE
static void _CrtLeaveDbgReport(int reportType)
dbgrpt_char_traits< wchar_t > wchar_traits
EXTERN_C int __cdecl _CrtDbgReportW(int reportType, const wchar_t *filename, int linenumber, const wchar_t *moduleName, const wchar_t *format,...)
static int _CrtHandleDbgReport(int reportType, const char_t *szCompleteMessage, const char_t *szFormatted, const char_t *filename, int linenumber, const char_t *moduleName)
int(WINAPI * tMessageBoxW)(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define DBGRPT_STRING_TOO_LONG
static int _CrtEnterDbgReport(int reportType, const char_t *filename, int linenumber)
static tMessageBoxW _CrtGetMessageBox()
EXTERN_C int __cdecl _CrtDbgReport(int reportType, const char *filename, int linenumber, const char *moduleName, const char *format,...)
static tMessageBoxW _CrtMessageBoxW
dbgrpt_char_traits< char > achar_traits
static int _CrtDbgReportWindow(int reportType, const char_t *filename, int linenumber, const char_t *moduleName, const char_t *message)
#define DBGRPT_ASSERT_PREFIX_MESSAGE
#define DBGRPT_ASSERT_PREFIX_NOMESSAGE
static int _CrtModeOutputFormat[_CRT_ERRCNT]
static const wchar_t * _CrtModeMessages[_CRT_ERRCNT]
static HMODULE _CrtGetUser32()
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest, size_t _Count, const wchar_t *_Format, va_list _Args)
_CRTIMP char *__cdecl _itoa(_In_ int _Value, _Pre_notnull_ _Post_z_ char *_Dest, _In_ int _Radix)
_CRTIMP wchar_t *__cdecl _itow(_In_ int _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
void * _InterlockedCompareExchangePointer(_Interlocked_operand_ void *volatile *_Destination, void *_Exchange, void *_Comparand)
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)
long __cdecl _InterlockedDecrement(_Interlocked_operand_ long volatile *_Addend)
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const char_t * szUnknownFile
static void OutputDebugString(const char_t *message)
static const wchar_t * szAssertionMessage
static const char_t * szEmptyString
static void OutputDebugString(const char_t *message)
static const char_t * szEmptyString
static const wchar_t * szAssertionMessage
static const char_t * szUnknownFile
#define OutputDebugString
BOOL WINAPI IsDebuggerPresent(void)
#define MB_ABORTRETRYIGNORE