From 10091bbca1380a1d8e3b9d61b8c175490036af5b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 2 Dec 2016 22:21:55 +0300 Subject: old shit died now there's no need to create fake services & events --- plugins/Sessions/Src/Main.cpp | 12 ++---------- plugins/Sessions/Src/stdafx.h | 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'plugins/Sessions') diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index d1c379893d..ba1cbaf64d 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -740,11 +740,8 @@ static int CreateButtons(WPARAM, LPARAM) return 0; } -static INT_PTR LaunchSessions(WPARAM wParam, LPARAM) +static void CALLBACK LaunchSessions() { - CallService(MS_SYSTEM_REMOVEWAIT, wParam, 0); - CloseHandle((HANDLE)wParam); - int startup = db_get_b(NULL, MODNAME, "StartupMode", 3); if (startup == 1 || (startup == 3 && isLastTRUE == TRUE)) { StartUp = TRUE; @@ -754,7 +751,6 @@ static INT_PTR LaunchSessions(WPARAM wParam, LPARAM) g_hghostw = TRUE; g_hDlg = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_WLCMDIALOG), 0, LoadSessionDlgProc); } - return 0; } static int PluginInit(WPARAM, LPARAM) @@ -846,11 +842,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction(MS_SESSIONS_SAVEUSERSESSION, SaveUserSessionHandles); CreateServiceFunction(MS_SESSIONS_CLOSESESSION, CloseCurrentSession); - HANDLE hEvent = CreateEvent(NULL, TRUE, TRUE, NULL); - if (hEvent != 0) { - CreateServiceFunction(MS_SESSIONS_LAUNCHME, LaunchSessions); - CallService(MS_SYSTEM_WAITONHANDLE, (WPARAM)hEvent, (LPARAM)MS_SESSIONS_LAUNCHME); - } + Miranda_WaitOnHandle(LaunchSessions); g_ses_count = db_get_b(NULL, MODNAME, "UserSessionsCount", 0); g_ses_limit = db_get_b(NULL, MODNAME, "TrackCount", 10); diff --git a/plugins/Sessions/Src/stdafx.h b/plugins/Sessions/Src/stdafx.h index d6cad97c92..35d25db35b 100644 --- a/plugins/Sessions/Src/stdafx.h +++ b/plugins/Sessions/Src/stdafx.h @@ -44,8 +44,6 @@ along with this program. If not, see . #define MODNAME "Sessions" -#define MS_SESSIONS_LAUNCHME "Sessions/Service/LaunchMe" - extern IconItem iconList[]; #define MIIM_STRING 0x00000040 -- cgit v1.2.3