diff options
Diffstat (limited to 'plugins/ChangeKeyboardLayout/src/main.cpp')
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/main.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/ChangeKeyboardLayout/src/main.cpp b/plugins/ChangeKeyboardLayout/src/main.cpp index 191d2dc9f7..f2ea678b30 100644 --- a/plugins/ChangeKeyboardLayout/src/main.cpp +++ b/plugins/ChangeKeyboardLayout/src/main.cpp @@ -31,7 +31,6 @@ HKL hklEng = (HKL)0x04090409; LPCTSTR ptszSeparators = _T(" \t\n\r");
HANDLE hOptionsInitialize;
-HANDLE hModulesLoaded;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
@@ -49,25 +48,22 @@ extern "C" __declspec(dllexport) int Load(void) mir_getLP(&pluginInfoEx);
ZeroMemory(hklLayouts, 20 * sizeof(HKL));
bLayNum = GetKeyboardLayoutList(20,hklLayouts);
- if (bLayNum<2)
+ if (bLayNum < 2)
return 1;
- hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise);
- hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED,ModulesLoaded);
+
+ HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise);
+ HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
return 0;
}
extern "C" __declspec(dllexport) int Unload(void)
{
- DWORD i;
-
- for (i = 0;i<bLayNum;i++)
+ for (int i = 0; i < bLayNum; i++)
mir_free(ptszLayStrings[i]);
- UnhookEvent(hOptionsInitialize);
- UnhookEvent(hModulesLoaded);
DestroyServiceFunction(hChangeLayout);
DestroyServiceFunction(hGetLayoutOfText);
DestroyServiceFunction(hChangeTextLayout);
UnhookWindowsHookEx(kbHook_All);
return 0;
-}
\ No newline at end of file +}
|