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" 47 template <
typename char_t>
85 L"\n\n(Press Retry to debug the application)";
92 L"\n\n(Press Retry to debug the application)";
147 template <
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",
186 template <
typename char_t>
198 char LineBuffer[20] = {0};
200 _itoa(linenumber, LineBuffer, 10);
225 template <
typename char_t>
226 static int _CrtHandleDbgReport(
int reportType,
const char_t* szCompleteMessage,
const char_t* szFormatted,
227 const char_t *
filename,
int linenumber,
const char_t *moduleName)
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");
BOOL WINAPI IsDebuggerPresent(VOID)
dbgrpt_char_traits< char > achar_traits
#define DBGRPT_ASSERT_PREFIX_NOMESSAGE
static HMODULE _CrtUser32Handle
static HMODULE _CrtGetUser32()
char * strcat(char *DstString, const char *SrcString)
EXTERN_C int __cdecl _CrtDbgReportW(int reportType, const wchar_t *filename, int linenumber, const wchar_t *moduleName, const wchar_t *format,...)
static const wchar_t * szAssertionMessage
EXTERN_C int __cdecl _CrtDbgReport(int reportType, const char *filename, int linenumber, const char *moduleName, const char *format,...)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
#define INVALID_HANDLE_VALUE
_CRTIMP wchar_t *__cdecl _itow(_In_ int _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
static tMessageBoxW _CrtGetMessageBox()
#define OutputDebugString
static const char_t * szEmptyString
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define DBGRPT_STRING_TOO_LONG
static int _CrtHandleDbgReport(int reportType, const char_t *szCompleteMessage, const char_t *szFormatted, const char_t *filename, int linenumber, const char_t *moduleName)
static const char_t * szEmptyString
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
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 char *__cdecl _itoa(_In_ int _Value, _Pre_notnull_ _Post_z_ char *_Dest, _In_ int _Radix)
dbgrpt_char_traits< wchar_t > wchar_traits
static const wchar_t * _CrtModeMessages[_CRT_ERRCNT]
static const char_t * szUnknownFile
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static void _CrtLeaveDbgReport(int reportType)
#define _CRTDBG_MODE_FILE
static const wchar_t * szAssertionMessage
void * _InterlockedCompareExchangePointer(_Interlocked_operand_ void *volatile *_Destination, void *_Exchange, void *_Comparand)
static void OutputDebugString(const char_t *message)
#define MB_ABORTRETRYIGNORE
static int _CrtDbgReportWindow(int reportType, const char_t *filename, int linenumber, const char_t *moduleName, const char_t *message)
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest, size_t _Count, const wchar_t *_Format, va_list _Args)
#define DBGRPT_ASSERT_PREFIX_MESSAGE
#define DBGRPT_MAX_BUFFER_SIZE
static void OutputDebugString(const char_t *message)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define _CRTDBG_MODE_WNDW
static int _CrtModeOutputFormat[_CRT_ERRCNT]
char * strcpy(char *DstString, const char *SrcString)
static const char_t * szUnknownFile
int(WINAPI * tMessageBoxW)(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
static int _CrtEnterDbgReport(int reportType, const char_t *filename, int linenumber)
#define GetProcAddress(x, y)
#define _CRT_WIDE(_String)
#define _CRTDBG_MODE_DEBUG
static tMessageBoxW _CrtMessageBoxW
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *