extern "C" __declspec (dllexport) int Unload(void) { MFLogger::getInstance()->log(L"Unload: start"); //wait for csmThread, msgQueueThread and userActionThread's end mirfoxMiranda.getMirfoxData().Plugin_Terminated = true; UnhookEvent(hProtoAck); int counter = 0; const int UNLOAD_WAIT_TIME = 50; //[ms] const int MAX_UNLOAD_WAIT_COUNTER = 10; //10 * 50ms = 0,5s while (mirfoxMiranda.getMirfoxData().workerThreadsCount > 0 ){ MFLogger::getInstance()->log_p(L"Unload: workerThreadsCount=%d > 0, waiting. counter=%d", mirfoxMiranda.getMirfoxData().workerThreadsCount, counter); SleepEx(UNLOAD_WAIT_TIME, TRUE); counter++; } MFLogger::getInstance()->log_p(L"Unload: workerThreadsCount=%d. counter=%d", mirfoxMiranda.getMirfoxData().workerThreadsCount, counter); MFLogger::getInstance()->log(L"Unload: last log"); mirfoxMiranda.onMirandaInterfaceUnload(); DeinitOptions(); return 0; }
extern "C" int __declspec(dllexport) Unload() { UnhookEvent(hSettingChangedEvent); UnhookEvent(hEventDeleted); UnhookEvent(hEventPreShutdown); UnhookEvent(hEventModulesLoaded); DeinitOptions(); DeleteObject(hFontTitle); DeleteObject(hFontLabels); DeleteObject(hFontValues); DeleteObject(hFontTrayTitle); DeinitTranslations(); return 0; }
extern "C" __declspec(dllexport) int Unload(void) { //UnhookEvent(hSettingChanged); UnhookEvent(hEventWindow); //UnhookEvent(hEventDbEventAddedFilter); //UnhookEvent(hEventDbEventAdded); DEBUGOUT_T("UNLOAD MIROTR") DeinitSRMM(); DeinitOptions(); DeinitDBFilter(); lib_cs_lock(); otrl_userstate_free(otr_user_state); lib_cs_unlock(); DeinitUtils(); return 0; }