[LIBCNTPR] Implement NT version of _invalid_parameter

This commit is contained in:
Timo Kreuzer
2025-10-24 14:03:41 +03:00
parent 090129bb1d
commit 0dea0cfa01
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
/*
* PROJECT: ReactOS NT CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of _invalid_parameter
* COPYRIGHT: Copyright 2025 Timo Kreuzer <timo.kreuzer@reactos.org>
*/
#include <stdlib.h>
#include <ndk/rtlfuncs.h>
void
__cdecl
_invalid_parameter(
_In_opt_z_ wchar_t const* expression,
_In_opt_z_ wchar_t const* function_name,
_In_opt_z_ wchar_t const* file_name,
_In_ unsigned int line_number,
_In_ uintptr_t reserved)
{
DbgPrint("%ws:%u: Invalid parameter ('%ws') passed to C runtime function %ws.\n",
file_name,
line_number,
expression,
function_name);
}

View File

@@ -5,6 +5,7 @@ list(APPEND COMMON_STDLIB_SOURCE
list(APPEND LIBCNTPR_STDLIB_SOURCE
${COMMON_STDLIB_SOURCE}
stdlib/_invalid_parameter_nt.c
stdlib/rand_nt.c
)