msvcrtd: Fix _CrtDbgReport calling convention.
[wine.git] / dlls / msvcrtd / debug.c
blob2756a13ac5a8da7930ca36d5e574f35976bb62db
1 /*
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/debug.h"
23 #include "winbase.h"
25 #define _DEBUG
26 #include "crtdbg.h"
28 int _crtAssertBusy = -1;
29 int _crtBreakAlloc = -1;
30 int _crtDbgFlag = 0;
32 #ifdef _WIN64
33 typedef unsigned __int64 MSVCRT_size_t;
34 #else
35 typedef unsigned long MSVCRT_size_t;
36 #endif
38 extern int _callnewh(MSVCRT_size_t);
40 /*********************************************************************
41 * _CrtSetDumpClient (MSVCRTD.@)
43 void * CDECL _CrtSetDumpClient(void *dumpClient)
45 return NULL;
49 /*********************************************************************
50 * _CrtSetReportHook (MSVCRTD.@)
52 void * CDECL _CrtSetReportHook(void *reportHook)
54 return NULL;
58 /*********************************************************************
59 * _CrtSetReportMode (MSVCRTD.@)
61 int CDECL _CrtSetReportMode(int reportType, int reportMode)
63 return 0;
67 /*********************************************************************
68 * _CrtSetBreakAlloc (MSVCRTD.@)
70 int CDECL _CrtSetBreakAlloc(int new)
72 int old = _crtBreakAlloc;
73 _crtBreakAlloc = new;
74 return old;
77 /*********************************************************************
78 * _CrtSetDbgFlag (MSVCRTD.@)
80 int CDECL _CrtSetDbgFlag(int new)
82 int old = _crtDbgFlag;
83 _crtDbgFlag = new;
84 return old;
88 /*********************************************************************
89 * _CrtDbgReport (MSVCRTD.@)
91 int WINAPIV _CrtDbgReport(int reportType, const char *filename, int linenumber,
92 const char *moduleName, const char *format, ...)
94 return 0;
97 /*********************************************************************
98 * _CrtDumpMemoryLeaks (MSVCRTD.@)
100 int CDECL _CrtDumpMemoryLeaks(void)
102 return 0;
105 /*********************************************************************
106 * _CrtCheckMemory (MSVCRTD.@)
108 int CDECL _CrtCheckMemory(void)
110 /* Note: maybe we could call here our heap validating functions ? */
111 return TRUE;
115 /*********************************************************************
116 * __p__crtAssertBusy (MSVCRTD.@)
118 int * CDECL __p__crtAssertBusy(void)
120 return &_crtAssertBusy;
123 /*********************************************************************
124 * __p__crtBreakAlloc (MSVCRTD.@)
126 int * CDECL __p__crtBreakAlloc(void)
128 return &_crtBreakAlloc;
131 /*********************************************************************
132 * __p__crtDbgFlag (MSVCRTD.@)
134 int * CDECL __p__crtDbgFlag(void)
136 return &_crtDbgFlag;