This function is called immediately before termination of the OCR for AnyDoc program. It is called at a point when you can display messages and other dialogs without affecting OCR for AnyDoc. This is an appropriate time to disconnect from databases and destroy global DLL variables.