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
Function | Use | .NET Framework equivalent |
---|---|---|
_set_new_handler | Transfers 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_translator | Handles 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_terminate | Installs 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_unexpected | Installs 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. |