Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * _continue_on_invalid_param.c
- * author: Anselm Kruis, <a.kruis@science-computing.de>
- *
- * This file has no copyright assigned and is placed in the Public Domain.
- * No warranty is given.
- *
- */
- # if __MSVCRT_VERSION__ >= 0x800
- #include <stdlib.h>
- #ifdef _DEBUG
- /* #include <crtdbg.h> not available */
- #ifndef _CRT_ASSERT
- #define _CRT_ASSERT 2
- #endif
- extern "C" {
- int __cdecl _CrtSetReportMode(int, int);
- }
- #endif
- extern "C" {
- static void __cdecl _nullInvalidParameterHandler(
- const wchar_t* expression,
- const wchar_t* function,
- const wchar_t* file,
- unsigned int line,
- uintptr_t pReserved)
- {
- return;
- }
- static int __cdecl set_continue_on_invalid_param(void) {
- _set_invalid_parameter_handler(_nullInvalidParameterHandler);
- #ifdef _DEBUG
- /* in _DEBUG mode, an _ASSERT is done as well! */
- _CrtSetReportMode(_CRT_ASSERT, 0);
- #endif
- return 0;
- }
- } // extern "C"
- static int init = set_continue_on_invalid_param();
- #endif /* # if __MSVCRT_VERSION__ >= 0x800 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement