Robustness

 

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 Robustness.

Use the following C run-time library functions to improve the robustness of your program.

Run-Time Robustness Functions

FunctionUse.NET Framework equivalent
_set_new_handlerTransfers control to your error-handling mechanism if the new operator fails to allocate memory.Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
_set_se_translatorHandles Win32 exceptions (C structured exceptions) as C++ typed exceptions.Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
set_terminateInstalls your own termination function to be called by terminate.Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
set_unexpectedInstalls your own termination function to be called by unexpected.Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

Run-Time Routines by Category
SetUnhandledExceptionFilter

Show: