Share via


_get_invalid_parameter_handler, _get_thread_local_invalid_parameter_handler

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at _get_invalid_parameter_handler, _get_thread_local_invalid_parameter_handler.

Gets the function that is called when the CRT detects an invalid argument.

Syntax

_invalid_parameter_handler _get_invalid_parameter_handler(void);  
_invalid_parameter_handler _get_thread_local_invalid_parameter_handler(void);  

Return Value

A pointer to the currently set invalid parameter handler function, or a null pointer if none has been set.

Remarks

The _get_invalid_parameter_handler function gets the currently set global invalid parameter handler. It returns a null pointer if no global invalid parameter handler was set. Similarly, the _get_thread_local_invalid_parameter_handler gets the current thread-local invalid parameter handler of the thread it is called on, or a null pointer if no handler was set. For information about how to set global and thread-local invalid parameter handlers, see _set_invalid_parameter_handler, _set_thread_local_invalid_parameter_handler.

The returned invalid parameter handler function pointer has the following type:

typedef void (__cdecl* _invalid_parameter_handler)(  
    wchar_t const*,  
    wchar_t const*,  
    wchar_t const*,   
    unsigned int,  
    uintptr_t  
    );  

For details on the invalid parameter handler, see the prototype in _set_invalid_parameter_handler, _set_thread_local_invalid_parameter_handler.

Requirements

Routine Required header
_get_invalid_parameter_handler, _get_thread_local_invalid_parameter_handler C: <stdlib.h>

C++: <cstdlib> or <stdlib.h>

The _get_invalid_parameter_handler and _get_thread_local_invalid_parameter_handler functions are Microsoft specific. For compatibility information, see Compatibility.

See Also

_set_invalid_parameter_handler, _set_thread_local_invalid_parameter_handler
Security-Enhanced Versions of CRT Functions