static void CloseProgram() { // Unloading try { CSound.RecordCloseAll(); CSound.CloseAllStreams(); CVideo.VdCloseAll(); CDraw.Unload(); CLog.CloseAll(); CDataBase.CloseConnections(); } catch (Exception) { } }