Export (0) Print
Expand All
div
eof
Expand Minimize

_RTC_SetErrorFuncW 

Designates a function as the handler for reporting run-time error checks (RTCs).


_RTC_error_fnW _RTC_SetErrorFuncW(
   _RTC_error_fnW function 
);

Parameters

function

The address of the function that will handle run-time error checks.

The previously defined error function. If there is no previously defined function, returns NULL.

Use only _RTC_SetErrorFuncW in new code. _RTC_SetErrorFunc is only included in the library for backward compatibility.

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 , ...);

where:

errorType

The type of error specified by _RTC_SetErrorType.

filename

The source file where the failure occurred or null if no debug information is available.

linenumber

The line in filename where the failure occurred or 0 if no debug information is available.

moduleName

The DLL or executable name where the failure occurred.

format

printf style string to display an error message, using the remaining parameters. The first argument of the VA_ARGLIST is the RTC Error number that occurred.

For an example of using _RTC_error_fnW, see Customizing CRT Run-Time Error Checking.

Routine Required header Compatibility

_RTC_SetErrorFuncW

<rtcapi.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

For more information, see Compatibility.

Libraries

All versions of the C run-time libraries.

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

Community Additions

ADD
Show:
© 2014 Microsoft