From 2cf824fd2efaec5fa0125fdde5fd513dd906d844 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 25 Sep 2013 19:25:38 +0000 Subject: plugins cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@6233 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BossKeyPlus/src/BossKey.cpp | 22 +++------------------- plugins/BossKeyPlus/src/BossKey.h | 3 +-- plugins/BossKeyPlus/src/Options.cpp | 5 ----- 3 files changed, 4 insertions(+), 26 deletions(-) (limited to 'plugins/BossKeyPlus/src') diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 9018cafb88..98d8068c78 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -36,7 +36,7 @@ HANDLE g_hHideService, g_hIsHiddenService; HWINEVENTHOOK g_hWinHook; HWND g_hListenWindow, hDlg, g_hDlgPass, hOldForegroundWindow; HWND_ITEM *g_pMirWnds; // a pretty simple linked list -HMODULE hWTS, hDwmApi; +HMODULE hDwmApi; DWORD g_dwMirandaPID; WORD g_wMask, g_wMaskAdv; bool g_bWindowHidden, g_fKeyPressed, g_fPassRequested, g_TrayIcon; @@ -49,8 +49,6 @@ TCHAR **oldStatusMsg; BYTE g_bOldSetting; int hLangpack; -PWTSRegisterSessionNotification wtsRegisterSessionNotification ; -PWTSUnRegisterSessionNotification wtsUnRegisterSessionNotification; PFNDwmIsCompositionEnabled dwmIsCompositionEnabled; void LanguageChanged(HWND hDlg); @@ -715,19 +713,8 @@ int MirandaLoaded(WPARAM,LPARAM) if (RegisterClass(&winclass)) { - hWTS = LoadLibrary(_T("wtsapi32.dll")); - g_hListenWindow = CreateWindow(BOSSKEY_LISTEN_INFO,BOSSKEY_LISTEN_INFO,WS_POPUP,0,0,5,5,pcli->hwndContactList,NULL,g_hInstance,NULL); - - if (hWTS) - { - wtsRegisterSessionNotification = (PWTSRegisterSessionNotification)GetProcAddress(hWTS, "WTSRegisterSessionNotification"); - if (wtsRegisterSessionNotification) - { - wtsUnRegisterSessionNotification = (PWTSUnRegisterSessionNotification)GetProcAddress(hWTS, "WTSUnRegisterSessionNotification"); - wtsRegisterSessionNotification(g_hListenWindow, 0); - } - } + WTSRegisterSessionNotification(g_hListenWindow, 0); } if (IsWinVerVistaPlus()) @@ -809,13 +796,10 @@ extern "C" int __declspec(dllexport) Unload(void) if (g_hListenWindow) { - if (wtsUnRegisterSessionNotification) - wtsUnRegisterSessionNotification(g_hListenWindow); + WTSUnRegisterSessionNotification(g_hListenWindow); DestroyWindow(g_hListenWindow); } - if (hWTS) - FreeLibrary(hWTS); if (hDwmApi) FreeLibrary(hDwmApi); diff --git a/plugins/BossKeyPlus/src/BossKey.h b/plugins/BossKeyPlus/src/BossKey.h index 71330e6037..2198c35bd7 100644 --- a/plugins/BossKeyPlus/src/BossKey.h +++ b/plugins/BossKeyPlus/src/BossKey.h @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -109,6 +110,4 @@ typedef struct HWND_ITEM_TYPE HWND_ITEM_TYPE *next; } HWND_ITEM; -typedef BOOL (WINAPI *PWTSRegisterSessionNotification)(HWND hWnd, DWORD dwFlags); -typedef BOOL (WINAPI *PWTSUnRegisterSessionNotification)(HWND hWnd); typedef HRESULT (WINAPI *PFNDwmIsCompositionEnabled)(BOOL *); diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp index c9be056eb2..95046f8922 100644 --- a/plugins/BossKeyPlus/src/Options.cpp +++ b/plugins/BossKeyPlus/src/Options.cpp @@ -50,11 +50,6 @@ INT_PTR CALLBACK MainOptDlg(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) g_fOptionsOpen = true; s_fRedraw = false; - extern PWTSRegisterSessionNotification wtsRegisterSessionNotification; - - if (wtsRegisterSessionNotification == 0) - EnableWindow(GetDlgItem(hwndDlg, IDC_MAINOPT_HIDEIFLOCK), SW_HIDE); - // set icon and tooltip for variables help button variables_skin_helpbutton(hwndDlg, IDC_MAINOPT_VARHELP); -- cgit v1.2.3