2 * msvcrtd.dll debugging code
4 * Copyright (C) 2003 Adam Gundy
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "wine/debug.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
27 int _crtAssertBusy = -1;
28 int _crtBreakAlloc = -1;
31 extern int _callnewh(unsigned long);
33 /*********************************************************************
34 * ??2@YAPAXIHPBDH@Z (MSVCRTD.@)
36 void *MSVCRTD_operator_new_dbg(
39 const char *szFileName,
42 void *retval = HeapAlloc(GetProcessHeap(), 0, nSize);
44 TRACE("(%lu, %d, '%s', %d) returning %p\n", nSize, nBlockUse, szFileName, nLine, retval);
52 /*********************************************************************
53 * _CrtSetDumpClient (MSVCRTD.@)
55 void *_CrtSetDumpClient(void *dumpClient)
61 /*********************************************************************
62 * _CrtSetReportHook (MSVCRTD.@)
64 void *_CrtSetReportHook(void *reportHook)
70 /*********************************************************************
71 * _CrtSetReportMode (MSVCRTD.@)
73 int _CrtSetReportMode(int reportType, int reportMode)
79 /*********************************************************************
80 * _CrtSetBreakAlloc (MSVCRTD.@)
82 int _CrtSetBreakAlloc(int new)
84 int old = _crtBreakAlloc;
89 /*********************************************************************
90 * _CrtSetDbgFlag (MSVCRTD.@)
92 int _CrtSetDbgFlag(int new)
94 int old = _crtDbgFlag;
100 /*********************************************************************
101 * _CrtDbgReport (MSVCRTD.@)
103 int _CrtDbgReport(int reportType, const char *filename, int linenumber,
104 const char *moduleName, const char *format, ...)
109 /*********************************************************************
110 * _CrtDumpMemoryLeaks (MSVCRTD.@)
112 int _CrtDumpMemoryLeaks()
117 /*********************************************************************
118 * _CrtCheckMemory (MSVCRTD.@)
120 int _CrtCheckMemory()
122 /* Note: maybe we could call here our heap validating functions ? */
127 /*********************************************************************
128 * __p__crtAssertBusy (MSVCRTD.@)
130 int *__p__crtAssertBusy(void)
132 return &_crtAssertBusy;
135 /*********************************************************************
136 * __p__crtBreakAlloc (MSVCRTD.@)
138 int *__p__crtBreakAlloc(void)
140 return &_crtBreakAlloc;
143 /*********************************************************************
144 * __p__crtDbgFlag (MSVCRTD.@)
146 int *__p__crtDbgFlag(void)