Engine Shutdowns and Connection Resets
If you are developing a multi-threaded console application targeting either Windows 9X or Windows NT, you must set up a control handler routine to handle a potential CTRL-C keystroke. In this control handler routine, you must clean up all of your Btrieve clients by issuing either a Reset operation (28) or a Stop operation (25). The cleanup process must complete before your application passes the CTRL-C event on to the operating system.
If your application still has active clients when the system terminates the threads, the MicroKernel cannot clean up its connection with the application and is forced to allocate more system resources. This causes performance degradation and significantly increases the time needed for the engine to shut down. For more information about control handler routines, refer to the Microsoft documentation.