|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Designates a function as the handler for reporting run-time error checks (RTCs).
Use only _RTC_SetErrorFuncW in new code. _RTC_SetErrorFunc is only included in the library for backward compatibility.
The _RTC_SetErrorFuncW callback applies only to the component that it was linked in, but not globally.
Make sure that the address you pass to _RTC_SetErrorFuncW is that of a valid error handling function.
If an error has been assigned a type of –1 with _RTC_SetErrorType, the error handler function is not called.
Before you can call this function, you must first call one of the run-time error check initialization functions; see Using Run-Time Checks without the C Run-Time Library
_RTC_error_fnW is defined as follows:
typedef int (__cdecl *_RTC_error_fnW)(int errorType, const wchar_t *filename, int linenumber, const wchar_t *moduleName, const wchar_t *format, ...);
For an example of using _RTC_error_fnW, see Customizing CRT Run-Time Error Checking.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.