static int ehhToolBarSystemShutdown(WPARAM wParam, LPARAM lParam) { //Remove services; ModernUnhookEvent(tbdat.hehSettingsChanged); ModernUnhookEvent(tbdat.hehModulesLoaded); ModernUnhookEvent(tbdat.hehSystemShutdown); ModernUnhookEvent(tbdat.hehOptInit); EnterCriticalSection(&tbdat.cs); g_CluiData.hEventToolBarModuleLoaded=NULL; li_ListDestruct(tbdat.listOfButtons,delete_MTB_BUTTONINFO); LeaveCriticalSection(&tbdat.cs); DeleteCriticalSection(&tbdat.cs); return 0; }
void DestructButtonsList() { int i=0; // for ( i=0; i < g_iButtonsCount; i++ ) while(ButtonsList[i]) { li_ListDestruct(ButtonsList[i]->sl,listdestructor); mir_free(ButtonsList[i]->ptszButtonName); if(ButtonsList[i]->ptszOPQValue!=ButtonsList[i]->ptszQValue) if (ButtonsList[i]->ptszOPQValue) mir_free(ButtonsList[i]->ptszOPQValue); if (ButtonsList[i]->ptszQValue) mir_free(ButtonsList[i]->ptszQValue); i++; } if(QuickList) { li_ZeroQuickList(QuickList); List_Destroy(QuickList); } }
void DestroyButton(int listnum) { int i=listnum; ListData* ld=ButtonsList[listnum]; mir_free(ld->ptszButtonName); if(ld->ptszOPQValue != ld->ptszQValue) mir_free(ld->ptszOPQValue); mir_free(ld->ptszQValue); li_ListDestruct((SortedList*)ld->sl,listdestructor); mir_free(ld); ButtonsList[i]=NULL; while(ButtonsList[i+1]) { ButtonsList[i]=ButtonsList[i+1]; ButtonsList[i+1]=NULL; i++; } }