Skip to content

Commit 0dea0cf

Browse files
committed
[LIBCNTPR] Implement NT version of _invalid_parameter
1 parent 090129b commit 0dea0cf

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* PROJECT: ReactOS NT CRT library
3+
* LICENSE: MIT (https://spdx.org/licenses/MIT)
4+
* PURPOSE: Implementation of _invalid_parameter
5+
* COPYRIGHT: Copyright 2025 Timo Kreuzer <[email protected]>
6+
*/
7+
8+
#include <stdlib.h>
9+
#include <ndk/rtlfuncs.h>
10+
11+
void
12+
__cdecl
13+
_invalid_parameter(
14+
_In_opt_z_ wchar_t const* expression,
15+
_In_opt_z_ wchar_t const* function_name,
16+
_In_opt_z_ wchar_t const* file_name,
17+
_In_ unsigned int line_number,
18+
_In_ uintptr_t reserved)
19+
{
20+
DbgPrint("%ws:%u: Invalid parameter ('%ws') passed to C runtime function %ws.\n",
21+
file_name,
22+
line_number,
23+
expression,
24+
function_name);
25+
}

sdk/lib/crt/stdlib/stdlib.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ list(APPEND COMMON_STDLIB_SOURCE
55

66
list(APPEND LIBCNTPR_STDLIB_SOURCE
77
${COMMON_STDLIB_SOURCE}
8+
stdlib/_invalid_parameter_nt.c
89
stdlib/rand_nt.c
910
)
1011

0 commit comments

Comments
 (0)