ReactOS 0.4.16-dev-927-g467dec4
dbgrptt.cpp File Reference
#include <corecrt_internal.h>
#include <errno.h>
#include <malloc.h>
#include <minmax.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for dbgrptt.cpp:

Go to the source code of this file.

Macros

#define _DEBUG
 
#define ASSERTINTRO1   "Assertion failed: "
 
#define ASSERTINTRO2   "Assertion failed!"
 

Functions

int __cdecl __acrt_MessageWindowA (int report_type, void *return_address, char const *file_name, char const *line_number, char const *module_name, char const *user_message)
 
int __cdecl __acrt_MessageWindowW (int report_type, void *return_address, wchar_t const *file_name, wchar_t const *line_number, wchar_t const *module_name, wchar_t const *user_message)
 
int __cdecl _CrtSetReportMode (int nRptType, int fMode)
 
_HFILE __cdecl _CrtSetReportFile (int nRptType, _HFILE hFile)
 
_CRT_REPORT_HOOK __cdecl _CrtSetReportHook (_CRT_REPORT_HOOK pfnNewHook)
 
_CRT_REPORT_HOOK __cdecl _CrtGetReportHook (void)
 
int __cdecl _VCrtDbgReportA (int nRptType, void *returnAddress, char const *szFile, int nLine, char const *szModule, char const *szFormat, va_list arglist)
 
int __cdecl _VCrtDbgReportW (int nRptType, void *returnAddress, wchar_t const *szFile, int nLine, wchar_t const *szModule, wchar_t const *szFormat, va_list arglist)
 

Variables

_CRT_REPORT_HOOK _pfnReportHook
 
__crt_report_hook_node< char > * _pReportHookList
 
__crt_report_hook_node< wchar_t > * _pReportHookListW
 
long _crtAssertBusy = -1
 
int _CrtDbgMode [_CRT_ERRCNT]
 
_HFILE _CrtDbgFile [_CRT_ERRCNT]
 

Macro Definition Documentation

◆ _DEBUG

#define _DEBUG

Definition at line 12 of file dbgrptt.cpp.

◆ ASSERTINTRO1

#define ASSERTINTRO1   "Assertion failed: "

Definition at line 214 of file dbgrptt.cpp.

◆ ASSERTINTRO2

#define ASSERTINTRO2   "Assertion failed!"

Definition at line 215 of file dbgrptt.cpp.

Function Documentation

◆ __acrt_MessageWindowA()

int __cdecl __acrt_MessageWindowA ( int  report_type,
void return_address,
char const file_name,
char const line_number,
char const module_name,
char const user_message 
)

Definition at line 443 of file dbgrpt.cpp.

451{
452 return common_message_window(report_type, return_address, file_name, line_number, module_name, user_message);
453}
static LPCWSTR LPCWSTR module_name
Definition: db.cpp:170
int const char const *const int const line_number
Definition: debug_heap.cpp:499
static LPCWSTR file_name
Definition: protocol.c:147
static int __cdecl common_message_window(int const report_type, void *const return_address, Character const *const file_name, Character const *const line_number, Character const *const module_name, Character const *const user_message)
Definition: dbgrpt.cpp:316
report_type
Definition: winetest.h:46

Referenced by _VCrtDbgReportA().

◆ __acrt_MessageWindowW()

int __cdecl __acrt_MessageWindowW ( int  report_type,
void return_address,
wchar_t const file_name,
wchar_t const line_number,
wchar_t const module_name,
wchar_t const user_message 
)

Definition at line 455 of file dbgrpt.cpp.

463{
464 return common_message_window(report_type, return_address, file_name, line_number, module_name, user_message);
465}

Referenced by _VCrtDbgReportW().

◆ _CrtGetReportHook()

_CRT_REPORT_HOOK __cdecl _CrtGetReportHook ( void  )

Definition at line 209 of file dbgrptt.cpp.

210{
211 return _pfnReportHook;
212}
_CRT_REPORT_HOOK _pfnReportHook
Definition: dbgrptt.cpp:44

◆ _CrtSetReportFile()

_HFILE __cdecl _CrtSetReportFile ( int  nRptType,
_HFILE  hFile 
)

Definition at line 143 of file dbgrptt.cpp.

147{
148 _HFILE oldFile;
149
150 /* validation section */
151 _VALIDATE_RETURN(nRptType >= 0 && nRptType < _CRT_ERRCNT, EINVAL, _CRTDBG_HFILE_ERROR);
152
154 return _CrtDbgFile[nRptType];
155
156 oldFile = _CrtDbgFile[nRptType];
157
160 else if (_CRTDBG_FILE_STDERR == hFile)
162 else
163 _CrtDbgFile[nRptType] = hFile;
164
165 return oldFile;
166}
#define EINVAL
Definition: acclib.h:90
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
#define _CRTDBG_FILE_STDOUT
Definition: crtdbg.h:32
#define _CRTDBG_HFILE_ERROR
Definition: crtdbg.h:31
#define _CRTDBG_FILE_STDERR
Definition: crtdbg.h:33
#define _CRT_ERRCNT
Definition: crtdbg.h:23
#define _CRTDBG_REPORT_FILE
Definition: crtdbg.h:34
_HFILE _CrtDbgFile[_CRT_ERRCNT]
Definition: dbgrptt.cpp:78
_In_ HANDLE hFile
Definition: mswsock.h:90
#define STD_OUTPUT_HANDLE
Definition: winbase.h:294
#define STD_ERROR_HANDLE
Definition: winbase.h:295

◆ _CrtSetReportHook()

_CRT_REPORT_HOOK __cdecl _CrtSetReportHook ( _CRT_REPORT_HOOK  pfnNewHook)

Definition at line 187 of file dbgrptt.cpp.

188{
189 _CRT_REPORT_HOOK pfnOldHook = _pfnReportHook;
190 _pfnReportHook = pfnNewHook;
191 return pfnOldHook;
192}
int(__cdecl * _CRT_REPORT_HOOK)(int, char *, int *)
Definition: crtdbg.h:36

◆ _CrtSetReportMode()

int __cdecl _CrtSetReportMode ( int  nRptType,
int  fMode 
)

Definition at line 101 of file dbgrptt.cpp.

105{
106 int oldMode;
107
108 /* validation section */
109 _VALIDATE_RETURN(nRptType >= 0 && nRptType < _CRT_ERRCNT, EINVAL, -1);
111 fMode == _CRTDBG_REPORT_MODE ||
113 EINVAL,
114 -1);
115
116 if (fMode == _CRTDBG_REPORT_MODE)
117 return _CrtDbgMode[nRptType];
118
119 oldMode = _CrtDbgMode[nRptType];
120
121 _CrtDbgMode[nRptType] = fMode;
122
123 return oldMode;
124}
#define _CRTDBG_MODE_DEBUG
Definition: crtdbg.h:26
#define _CRTDBG_MODE_WNDW
Definition: crtdbg.h:27
#define _CRTDBG_MODE_FILE
Definition: crtdbg.h:25
#define _CRTDBG_REPORT_MODE
Definition: crtdbg.h:28
int _CrtDbgMode[_CRT_ERRCNT]
Definition: dbgrptt.cpp:71

◆ _VCrtDbgReportA()

int __cdecl _VCrtDbgReportA ( int  nRptType,
void returnAddress,
char const szFile,
int  nLine,
char const szModule,
char const szFormat,
va_list  arglist 
)

Definition at line 241 of file dbgrptt.cpp.

250{
251 int retval=0;
252 int handled=FALSE;
253
254 char szLineMessage[DBGRPT_MAX_MSG]{0};
255 char szOutMessage [DBGRPT_MAX_MSG]{0};
256 wchar_t szOutMessage2[DBGRPT_MAX_MSG]{0};
257 char szUserMessage[DBGRPT_MAX_MSG]{0};
258
259 if (nRptType < 0 || nRptType >= _CRT_ERRCNT)
260 return -1;
261
262 /*
263 * handle the (hopefully rare) case of
264 *
265 * 1) ASSERT while already dealing with an ASSERT
266 * or
267 * 2) two threads asserting at the same time
268 */
269
270 __try
271 {
272 if (_CRT_ASSERT == nRptType && _InterlockedIncrement(&_crtAssertBusy) > 0)
273 {
274 /* use only 'safe' functions -- must not assert in here! */
275
276 _ERRCHECK(_itoa_s(nLine, szLineMessage, DBGRPT_MAX_MSG, 10));
277
278 __acrt_OutputDebugStringA("Second Chance Assertion Failed: File ");
279 __acrt_OutputDebugStringA(szFile ? szFile : "<file unknown>");
280 __acrt_OutputDebugStringA(", Line ");
281 __acrt_OutputDebugStringA(szLineMessage);
283
284 _CrtDbgBreak();
285 retval=-1;
286 __leave;
287 }
288
289 // Leave space for ASSERTINTRO1 and "\r\n"
290 if (szFormat)
291 {
292 int szlen = 0;
293 _ERRCHECK_SPRINTF(szlen = _vsnprintf_s(szUserMessage, DBGRPT_MAX_MSG,
294 DBGRPT_MAX_MSG - 2- max(sizeof(ASSERTINTRO1),sizeof(ASSERTINTRO2)),
295 szFormat, arglist));
296 if (szlen < 0)
297 {
299 }
300 }
301
302 if (_CRT_ASSERT == nRptType)
303 {
304 _ERRCHECK(strcpy_s(szLineMessage, DBGRPT_MAX_MSG, szFormat ? ASSERTINTRO1 : ASSERTINTRO2));
305 }
306
307 _ERRCHECK(strcat_s(szLineMessage, DBGRPT_MAX_MSG, szUserMessage));
308
309 if (_CRT_ASSERT == nRptType)
310 {
311 if (_CrtDbgMode[nRptType] & _CRTDBG_MODE_FILE)
312 {
313 _ERRCHECK(strcat_s(szLineMessage, DBGRPT_MAX_MSG, "\r"));
314 }
315
316 _ERRCHECK(strcat_s(szLineMessage, DBGRPT_MAX_MSG, "\n"));
317 }
318
319 if (szFile)
320 {
321 int szlen = 0;
322 _ERRCHECK_SPRINTF(szlen = _snprintf_s(szOutMessage, DBGRPT_MAX_MSG, DBGRPT_MAX_MSG - 1, "%s(%d) : %s",
323 szFile, nLine, szLineMessage));
324 if (szlen < 0)
325 {
327 }
328 }
329 else
330 {
331 _ERRCHECK(strcpy_s(szOutMessage, DBGRPT_MAX_MSG, szLineMessage));
332 }
333
334 {
335 size_t ret = 0;
336 errno_t e = 0;
337 _ERRCHECK_EINVAL_ERANGE(e = mbstowcs_s(&ret, szOutMessage2, DBGRPT_MAX_MSG, szOutMessage, _TRUNCATE));
338 if(e != 0)
339 {
341 }
342 }
343
344 /* User hook may handle report.
345 We have to check the ANSI Hook2 List & then the UNICODE Hook2 List.
346 Then we have check any ANSI individual Hook set through
347 SetReportHook */
348
350 {
351 __crt_report_hook_node<char> *pnode=nullptr;
352 __crt_report_hook_node<wchar_t> *pnodeW=nullptr;
353
355 __try
356 {
357 for (pnode = _pReportHookList; pnode; pnode = pnode->next)
358 {
359 int hook_retval=0;
360 if (pnode->hook(nRptType, szOutMessage, &hook_retval))
361 {
362 handled=TRUE;
363 retval=hook_retval;
364 __leave;
365 }
366 }
367
368 for (pnodeW = _pReportHookListW; pnodeW; pnodeW = pnodeW->next)
369 {
370 int hook_retval=0;
371 if (pnodeW->hook(nRptType, szOutMessage2, &hook_retval))
372 {
373 handled=TRUE;
374 retval=hook_retval;
375 __leave;
376 }
377 }
378 }
380 {
382 }
384 }
385
386 if (handled)
387 __leave;
388
389 if (_pfnReportHook)
390 {
391 int hook_retval=0;
392 if (_pfnReportHook(nRptType, szOutMessage, &hook_retval))
393 {
394 retval = hook_retval;
395 __leave;
396 }
397 }
398
399 if (_CrtDbgMode[nRptType] & _CRTDBG_MODE_FILE)
400 {
401 if (_CrtDbgFile[nRptType] != _CRTDBG_INVALID_HFILE)
402 {
403 DWORD bytes_written = 0;
404 WriteFile(_CrtDbgFile[nRptType], szOutMessage, static_cast<DWORD>(strlen(szOutMessage)), &bytes_written, nullptr);
405 }
406 }
407
408 if (_CrtDbgMode[nRptType] & _CRTDBG_MODE_DEBUG)
409 {
410 __acrt_OutputDebugStringA(szOutMessage);
411 }
412
413 if (_CrtDbgMode[nRptType] & _CRTDBG_MODE_WNDW)
414 {
415 szLineMessage[0] = 0;
416 if (nLine)
417 {
418 _ERRCHECK(_itoa_s(nLine, szLineMessage, DBGRPT_MAX_MSG, 10));
419 }
420
421 retval = __acrt_MessageWindowA(nRptType, returnAddress, szFile, (nLine ? szLineMessage : nullptr), szModule, szUserMessage);
422 }
423 }
425 {
426 if (_CRT_ASSERT == nRptType)
427 {
429 }
430 }
432
433 return retval;
434}
int _vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr)
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
void __cdecl __acrt_unlock(_In_ __acrt_lock_id lock)
Definition: locks.cpp:57
#define DBGRPT_MAX_MSG
@ __acrt_debug_lock
#define DBGRPT_INVALIDMSG
#define _ERRCHECK_EINVAL_ERANGE(e)
#define _ERRCHECK(e)
void WINAPI __acrt_OutputDebugStringA(_In_opt_ LPCSTR text)
#define _ERRCHECK_SPRINTF(_PrintfCall)
#define DBGRPT_TOOLONGMSG
#define _CRT_ASSERT
Definition: crtdbg.h:22
#define _CRTDBG_INVALID_HFILE
Definition: crtdbg.h:30
#define _CrtDbgBreak()
Definition: crtdbg.h:103
__crt_report_hook_node< wchar_t > * _pReportHookListW
Definition: dbgrptt.cpp:47
int __cdecl __acrt_MessageWindowA(int report_type, void *return_address, char const *file_name, char const *line_number, char const *module_name, char const *user_message)
Definition: dbgrpt.cpp:443
#define ASSERTINTRO1
Definition: dbgrptt.cpp:214
__crt_report_hook_node< char > * _pReportHookList
Definition: dbgrptt.cpp:46
#define ASSERTINTRO2
Definition: dbgrptt.cpp:215
long _crtAssertBusy
Definition: dbgrptt.cpp:49
__acrt_lock(__acrt_heap_lock)
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
unsigned long DWORD
Definition: ntddk_ex.h:95
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)
long __cdecl _InterlockedDecrement(_Interlocked_operand_ long volatile *_Addend)
int CDECL _itoa_s(int value, char *str, size_t size, int radix)
Definition: itoa.c:195
#define e
Definition: ke_i.h:82
#define strcpy_s(d, l, s)
Definition: utility.h:200
#define wcscpy_s(d, l, s)
Definition: utility.h:201
errno_t mbstowcs_s(size_t *cchConverted, wchar_t *widechar, size_t charoutct, const char *multibyte, size_t count)
Definition: mbstowcs.cpp:316
#define __try
Definition: pseh2_64.h:188
#define __leave
Definition: pseh2_64.h:192
#define __endtry
Definition: pseh2_64.h:191
#define __finally
Definition: pseh2_64.h:190
int CDECL strcat_s(char *dst, size_t elem, const char *src)
Definition: string.c:40
va_lists_t arglist[FMT_ARGMAX+1]
Definition: format.c:284
#define max(a, b)
Definition: svc.c:63
int errno_t
Definition: corecrt.h:615
#define _TRUNCATE
Definition: corecrt.h:278
#define _CRT_WIDE(_String)
Definition: vcruntime.h:20
int ret
int retval
Definition: wcstombs.cpp:91

◆ _VCrtDbgReportW()

int __cdecl _VCrtDbgReportW ( int  nRptType,
void returnAddress,
wchar_t const szFile,
int  nLine,
wchar_t const szModule,
wchar_t const szFormat,
va_list  arglist 
)

Definition at line 461 of file dbgrptt.cpp.

471{
472 int retval=0;
473 int handled=FALSE;
474 wchar_t szLineMessage[DBGRPT_MAX_MSG] = {0};
475 wchar_t szOutMessage[DBGRPT_MAX_MSG] = {0};
476 char szOutMessage2[DBGRPT_MAX_MSG] = {0};
477 wchar_t szUserMessage[DBGRPT_MAX_MSG] = {0};
478
479 if (nRptType < 0 || nRptType >= _CRT_ERRCNT)
480 return -1;
481
482 /*
483 * handle the (hopefully rare) case of
484 *
485 * 1) ASSERT while already dealing with an ASSERT
486 * or
487 * 2) two threads asserting at the same time
488 */
489
490 __try
491 {
492 if (_CRT_ASSERT == nRptType && _InterlockedIncrement(&_crtAssertBusy) > 0)
493 {
494 /* use only 'safe' functions -- must not assert in here! */
495
496 _ERRCHECK(_itow_s(nLine, szLineMessage, DBGRPT_MAX_MSG, 10));
497
498 OutputDebugStringW(L"Second Chance Assertion Failed: File ");
499 OutputDebugStringW(szFile ? szFile : L"<file unknown>");
500 OutputDebugStringW(L", Line ");
501 OutputDebugStringW(szLineMessage);
503
504 _CrtDbgBreak();
505 retval = -1;
506 __leave;
507 }
508
509 if (szFormat)
510 {
511 // Leave space for ASSERTINTRO{1,2} and "\r\n"
512 size_t const max_assert_intro_count = __max(_countof(ASSERTINTRO1), _countof(ASSERTINTRO2));
513 size_t const max_user_message_count = _countof(szUserMessage) - 2 - max_assert_intro_count;
514
515 // Force use of the legacy stdio wide character format specifiers
516 // mode for source compatibility. If we ever revisit support for
517 // the standard format specifiers, we'll need to revisit this as
518 // well.
519 int szlen = 0;
522 szUserMessage,
523 _countof(szUserMessage),
524 max_user_message_count,
525 szFormat,
526 nullptr,
527 arglist));
528 if (szlen < 0)
529 {
531 }
532 }
533
534 if (_CRT_ASSERT == nRptType)
536
537 _ERRCHECK(wcscat_s(szLineMessage, DBGRPT_MAX_MSG, szUserMessage));
538
539 if (_CRT_ASSERT == nRptType)
540 {
541 if (_CrtDbgMode[nRptType] & _CRTDBG_MODE_FILE)
542 _ERRCHECK(wcscat_s(szLineMessage, DBGRPT_MAX_MSG, L"\r"));
543 {
544 _ERRCHECK(wcscat_s(szLineMessage, DBGRPT_MAX_MSG, L"\n"));
545 }
546 }
547
548 if (szFile)
549 {
550 int szlen = 0;
551 _ERRCHECK_SPRINTF(szlen = _snwprintf_s(szOutMessage, DBGRPT_MAX_MSG, DBGRPT_MAX_MSG, L"%ls(%d) : %ls",
552 szFile, nLine, szLineMessage));
553 if (szlen < 0)
555 }
556 else
557 {
558 _ERRCHECK(wcscpy_s(szOutMessage, DBGRPT_MAX_MSG, szLineMessage));
559 }
560
561 /* scope */
562 {
563 errno_t e = _ERRCHECK_EINVAL_ERANGE(wcstombs_s(nullptr, szOutMessage2, DBGRPT_MAX_MSG, szOutMessage, _TRUNCATE));
564 if(e != 0)
566 }
567
568 /* User hook may handle report.
569 We have to check the ANSI Hook2 List & then the UNICODE Hook2 List.
570 Then we have check any ANSI individual Hook set through
571 SetReportHook */
572
574 {
575 __crt_report_hook_node<char> *pnode=nullptr;
576 __crt_report_hook_node<wchar_t> *pnodeW=nullptr;
577
579 __try
580 {
581 for (pnode = _pReportHookList; pnode; pnode = pnode->next)
582 {
583 int hook_retval=0;
584 if (pnode->hook(nRptType, szOutMessage2, &hook_retval))
585 {
586 retval=hook_retval;
587 handled=TRUE;
588 __leave;
589 }
590 }
591
592 for (pnodeW = _pReportHookListW; pnodeW; pnodeW = pnodeW->next)
593 {
594 int hook_retval=0;
595 if (pnodeW->hook(nRptType, szOutMessage, &hook_retval))
596 {
597 retval=hook_retval;
598 handled=TRUE;
599 __leave;
600 }
601 }
602 }
604 {
606 }
608 }
609
610 if (handled)
611 __leave;
612
614 {
615 int hook_retval=0;
616 if (_pfnReportHook(nRptType, szOutMessage2, &hook_retval))
617 {
618 retval = hook_retval;
619 __leave;
620 }
621 }
622
623 if ((_CrtDbgMode[nRptType] & _CRTDBG_MODE_FILE) && _CrtDbgFile[nRptType] != _CRTDBG_INVALID_HFILE)
624 {
625 /* Use WriteConsole for Consoles, WriteFile otherwise */
626 switch (GetFileType(_CrtDbgFile[nRptType]))
627 {
628 case FILE_TYPE_CHAR:
629 {
630 DWORD characters_written = 0;
631 if (WriteConsoleW(_CrtDbgFile[nRptType], szOutMessage, static_cast<DWORD>(wcslen(szOutMessage)), &characters_written, nullptr))
632 break;
633
634 /* If WriteConsole fails & LastError is ERROR_INVALID_VALUE, then the console is redirected */
636 break;
637 }
638 default:
639 {
640 char szaOutMessage[DBGRPT_MAX_MSG];
641 size_t ret = 0;
642 errno_t e = _ERRCHECK_EINVAL_ERANGE(wcstombs_s(&ret, szaOutMessage, DBGRPT_MAX_MSG, szOutMessage, _TRUNCATE));
643
644 if (e != 0 && e != STRUNCATE)
645 {
646 DWORD bytes_written = 0;
647 WriteFile(_CrtDbgFile[nRptType], szOutMessage, static_cast<DWORD>(wcslen(szOutMessage)) * 2, &bytes_written, nullptr);
648 }
649 else
650 {
651 /* ret counts for the null terminator as well */
652 if (ret > 0)
653 {
654 --ret;
655 }
656
657 DWORD bytes_written = 0;
658 WriteFile(_CrtDbgFile[nRptType], szaOutMessage, static_cast<DWORD>(ret), &bytes_written, nullptr);
659 }
660 }
661 }
662 }
663
664 if (_CrtDbgMode[nRptType] & _CRTDBG_MODE_DEBUG)
665 {
666 ::OutputDebugStringW(szOutMessage);
667 }
668
669 if (_CrtDbgMode[nRptType] & _CRTDBG_MODE_WNDW)
670 {
671 szLineMessage[0] = 0;
672 if (nLine)
673 {
674 _ERRCHECK(_itow_s(nLine, szLineMessage, DBGRPT_MAX_MSG, 10));
675 }
676 retval = __acrt_MessageWindowW(nRptType, returnAddress, szFile, (nLine ? szLineMessage : nullptr), szModule, szUserMessage);
677 }
678 }
680 {
681 if (_CRT_ASSERT == nRptType)
682 {
684 }
685 }
687
688 return retval;
689}
#define _CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS
int __cdecl __acrt_MessageWindowW(int report_type, void *return_address, wchar_t const *file_name, wchar_t const *line_number, wchar_t const *module_name, wchar_t const *user_message)
Definition: dbgrpt.cpp:455
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleW(IN HANDLE hConsoleOutput, IN CONST VOID *lpBuffer, IN DWORD nNumberOfCharsToWrite, OUT LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved)
Definition: readwrite.c:1447
DWORD WINAPI GetFileType(HANDLE hFile)
Definition: fileinfo.c:269
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define __max(a, b)
Definition: stdlib.h:101
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
int CDECL _itow_s(int value, wchar_t *str, size_t size, int radix)
Definition: itow.c:222
_Check_return_wat_ _CRTIMP errno_t __cdecl wcstombs_s(_Out_opt_ size_t *pcchConverted, _Out_writes_bytes_to_opt_(cjDstSize, *pcchConverted) char *pmbsDst, _In_ size_t cjDstSize, _In_z_ const wchar_t *pwszSrc, _In_ size_t cjMaxCount)
#define L(x)
Definition: ntvdm.h:50
int __cdecl __stdio_common_vsnwprintf_s(unsigned __int64 const options, wchar_t *const buffer, size_t const buffer_count, size_t const max_count, wchar_t const *const format, _locale_t const locale, va_list const arglist)
Definition: output.cpp:407
#define STRUNCATE
Definition: errno.h:110
#define _countof(array)
Definition: sndvol32.h:70
INT CDECL wcscat_s(wchar_t *dst, size_t elem, const wchar_t *src)
Definition: wcs.c:406
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define FILE_TYPE_CHAR
Definition: winbase.h:286

Variable Documentation

◆ _crtAssertBusy

long _crtAssertBusy = -1

Definition at line 49 of file dbgrptt.cpp.

Referenced by _VCrtDbgReportA(), and _VCrtDbgReportW().

◆ _CrtDbgFile

◆ _CrtDbgMode

int _CrtDbgMode[_CRT_ERRCNT]

◆ _pfnReportHook

_CRT_REPORT_HOOK _pfnReportHook

Definition at line 44 of file dbgrptt.cpp.

Referenced by _CrtGetReportHook(), _CrtSetReportHook(), _VCrtDbgReportA(), and _VCrtDbgReportW().

◆ _pReportHookList

__crt_report_hook_node<char>* _pReportHookList

Definition at line 46 of file dbgrptt.cpp.

Referenced by _VCrtDbgReportA(), and _VCrtDbgReportW().

◆ _pReportHookListW

__crt_report_hook_node<wchar_t>* _pReportHookListW

Definition at line 47 of file dbgrptt.cpp.

Referenced by _VCrtDbgReportA(), and _VCrtDbgReportW().