ReactOS 0.4.16-dev-106-g10b08aa
_invalid_parameter.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS CRT library
3 * LICENSE: MIT (https://spdx.org/licenses/MIT)
4 * PURPOSE: _invalid_parameter implementation
5 * COPYRIGHT: Timo Kreuzer <timo.kreuzer@reactos.org>
6 */
7
8#include <precomp.h>
9
10#ifdef _MSVCRTEX_
11#undef TRACE
12#undef ERR
13#define TRACE(...)
14#define ERR(...)
15#endif
16
18
19/******************************************************************************
20 * _invalid_parameter (MSVCRT.@)
21 */
22void __cdecl _invalid_parameter(const wchar_t *expr, const wchar_t *func,
23 const wchar_t *file, unsigned int line, uintptr_t arg)
24{
26 else
27 {
28 ERR( "%s:%u %s: %s %lx\n", debugstr_w(file), line, debugstr_w(func), debugstr_w(expr), arg );
29#if _MSVCR_VER > 0 // FIXME: possible improvement: use a global variable in the DLL
31#endif
32 }
33}
34
35/* _get_invalid_parameter_handler - not exported in native msvcrt, added in msvcr80 */
37{
38 TRACE("\n");
40}
41
42/* _set_invalid_parameter_handler - not exproted in native msvcrt, added in msvcr80 */
45{
47
48 TRACE("(%p)\n", handler);
49
51 return old;
52}
_invalid_parameter_handler CDECL _set_invalid_parameter_handler(_invalid_parameter_handler handler)
void __cdecl _invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t arg)
static _invalid_parameter_handler invalid_parameter_handler
_invalid_parameter_handler CDECL _get_invalid_parameter_handler(void)
#define __cdecl
Definition: accygwin.h:79
#define ERR(fmt,...)
Definition: precomp.h:57
unsigned int uintptr_t
Definition: crtdefs.h:321
#define NULL
Definition: types.h:112
#define CDECL
Definition: compat.h:29
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7512
GLenum func
Definition: glext.h:6028
void(__cdecl * _invalid_parameter_handler)(const wchar_t *, const wchar_t *, const wchar_t *, unsigned int, uintptr_t)
Definition: stdlib.h:125
#define debugstr_w
Definition: kernel32.h:32
#define STATUS_INVALID_CRUNTIME_PARAMETER
Definition: ntstatus.h:959
#define TRACE(s)
Definition: solgame.cpp:4
Definition: query.h:86
Definition: fci.c:127
Definition: parser.c:49
#define EXCEPTION_NONCONTINUABLE
Definition: stubs.h:23