The function is called when the application finishes. After the function call no preview windows can be created. Usually this call is made in the ExitInstance() member function of your application.