summaryrefslogtreecommitdiff
path: root/plugins/BossKeyPlus
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
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')
-rw-r--r--plugins/BossKeyPlus/BossKey_10.vcxproj7
-rw-r--r--plugins/BossKeyPlus/BossKey_11.vcxproj4
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp22
-rw-r--r--plugins/BossKeyPlus/src/BossKey.h3
-rw-r--r--plugins/BossKeyPlus/src/Options.cpp5
5 files changed, 12 insertions, 29 deletions
diff --git a/plugins/BossKeyPlus/BossKey_10.vcxproj b/plugins/BossKeyPlus/BossKey_10.vcxproj
index 50397d9cdd..c82baffb05 100644
--- a/plugins/BossKeyPlus/BossKey_10.vcxproj
+++ b/plugins/BossKeyPlus/BossKey_10.vcxproj
@@ -96,6 +96,7 @@
<SubSystem>Windows</SubSystem>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
<AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
+ <AdditionalDependencies>Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -122,6 +123,7 @@
<SubSystem>Windows</SubSystem>
<BaseAddress>0x32270000</BaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -151,6 +153,7 @@
<SubSystem>Windows</SubSystem>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
<AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
+ <AdditionalDependencies>Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -176,6 +179,7 @@
<BaseAddress>0x32270000</BaseAddress>
<SubSystem>Windows</SubSystem>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin10\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@@ -195,9 +199,6 @@
<ResourceCompile Include="res\BossKey.rc" />
<ResourceCompile Include="res\version.rc" />
</ItemGroup>
- <ItemGroup>
- <None Include="res\logo.ico" />
- </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/plugins/BossKeyPlus/BossKey_11.vcxproj b/plugins/BossKeyPlus/BossKey_11.vcxproj
index cfd3780b77..6c551894b9 100644
--- a/plugins/BossKeyPlus/BossKey_11.vcxproj
+++ b/plugins/BossKeyPlus/BossKey_11.vcxproj
@@ -99,6 +99,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -126,6 +127,7 @@
<BaseAddress>0x32270000</BaseAddress>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalDependencies>Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -154,6 +156,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<SubSystem>Windows</SubSystem>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -179,6 +182,7 @@
<BaseAddress>0x32270000</BaseAddress>
<SubSystem>Windows</SubSystem>
<AdditionalLibraryDirectories>$(ProfileDir)..\..\bin11\lib</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
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);