Many C run-time functions check the validity of arguments passed to them. If an invalid argument is passed, the function can set the errno error number or return an error code. In such cases, the invalid parameter handler is also called. This function allows that handler to be set to another function. Only one function can be specified as the invalid argument handler at a time.
The invalid parameter handler function must have the following prototype:
|
void _invalid_parameter(
const wchar_t * expression,
const wchar_t * function,
const wchar_t * file,
unsigned int line,
uintptr_t pReserved
); |
The first argument is the argument expression. The second argument is the name of the CRT function that received the invalid argument. The third argument is the file name in the CRT source. The fourth argument is the line in that file. The last argument is reserved. The parameters all have the value NULL unless a debug version of the CRT library is used.