I have a console app that accesses database routines in a dll. Before the program terminates I need to call a routine in the dll to de-initialize and close database connections. When a user breaks out of the program using Control-break I don't get a chance to call the routine and end up with an access violation. Is there a way to catch or prevent control-breaks before the program is terminated?
For more complete information about compiler optimizations, see our Optimization Notice.