summaryrefslogtreecommitdiff
path: root/plugins/BossKeyPlus/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-25 19:25:38 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-25 19:25:38 +0000
commit2cf824fd2efaec5fa0125fdde5fd513dd906d844 (patch)
treeaadae8304f8cf90c06c73ca49180c62faeef539b /plugins/BossKeyPlus/src
parenta01f62f394fc01e3c6ed89924be804d2438787e5 (diff)
plugins cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@6233 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BossKeyPlus/src')
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp22
-rw-r--r--plugins/BossKeyPlus/src/BossKey.h3
-rw-r--r--plugins/BossKeyPlus/src/Options.cpp5
3 files changed, 4 insertions, 26 deletions
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 <windows.h>
#include <shellapi.h>
+#include <Wtsapi32.h>
#include <newpluginapi.h>
#include <m_database.h>
@@ -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);