summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins/KeepStatus
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-07 20:25:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-07 20:25:38 +0000
commit920aa970afa086a3a143b39005747210b94f237b (patch)
tree10e5bdc77f6a533772e4509e4a56ba3f7dc46722 /plugins/StatusPlugins/KeepStatus
parent097c52ad9a2928422084bf76cebee58958341574 (diff)
Trigger plugin's support removed, cause this plugin is dead
git-svn-id: http://svn.miranda-ng.org/main/trunk@4374 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/KeepStatus')
-rw-r--r--plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj2
-rw-r--r--plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj.filters6
-rw-r--r--plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj2
-rw-r--r--plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj.filters6
-rw-r--r--plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp184
-rw-r--r--plugins/StatusPlugins/KeepStatus/keepstatus.cpp19
-rw-r--r--plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp181
7 files changed, 0 insertions, 400 deletions
diff --git a/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj b/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj
index b8862c094d..6acc94b0cc 100644
--- a/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj
+++ b/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj
@@ -211,11 +211,9 @@
<ClCompile Include="..\..\helpers\gen_helpers.cpp">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="action_keepstatus.cpp" />
<ClCompile Include="keepstatus.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="options.cpp" />
- <ClCompile Include="trigger_keepstatus.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\commonstatus.h" />
diff --git a/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj.filters b/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj.filters
index 93701d6b66..9d4b6dcc2d 100644
--- a/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj.filters
+++ b/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj.filters
@@ -15,9 +15,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="action_keepstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\commonstatus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -36,9 +33,6 @@
<ClCompile Include="options.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="trigger_keepstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj b/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj
index 79fefc9151..584e4a7aba 100644
--- a/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj
+++ b/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj
@@ -216,11 +216,9 @@
<ClCompile Include="..\..\helpers\gen_helpers.cpp">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="action_keepstatus.cpp" />
<ClCompile Include="keepstatus.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="options.cpp" />
- <ClCompile Include="trigger_keepstatus.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\commonstatus.h" />
diff --git a/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj.filters b/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj.filters
index 93701d6b66..9d4b6dcc2d 100644
--- a/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj.filters
+++ b/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj.filters
@@ -15,9 +15,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="action_keepstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\commonstatus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -36,9 +33,6 @@
<ClCompile Include="options.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="trigger_keepstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp
deleted file mode 100644
index f51f258ec7..0000000000
--- a/plugins/StatusPlugins/KeepStatus/action_keepstatus.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-#include "../commonstatus.h"
-#include "keepstatus.h"
-#include "../resource.h"
-#include "m_trigger.h"
-
-extern HINSTANCE hInst;
-
-#define STR_PROTOFROMTRIGGER "PROTO_FT"
-#define SETTING_PROTO_ENABLED "proto_Enabled"
-
-static BOOL ProtocolEnabled(DWORD id, char *szPrefix, REPORTINFO *ri, char *szProto)
-{
- char dbSetting[128];
- _snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, szProto, SETTING_PROTO_ENABLED);
- if ( db_get_b(NULL, MODULENAME, dbSetting, 0))
- return TRUE;
-
- if ( ri != NULL && ri->td != NULL && (ri->td->dFlags & DF_PROTO) && !strcmp(szProto, ri->td->szProto)) {
- _snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, STR_PROTOFROMTRIGGER, SETTING_PROTO_ENABLED);
- return db_get_b(NULL, MODULENAME, dbSetting, 0);
- }
-
- return FALSE;
-}
-
-static void BuildProtoList(HWND hList, BOOL bFromTrigger, char* szPrefix, DWORD id)
-{
- ListView_SetExtendedListViewStyleEx(hList, LVS_EX_FULLROWSELECT|LVS_EX_CHECKBOXES, LVS_EX_FULLROWSELECT|LVS_EX_CHECKBOXES);
-
- LVCOLUMN lvCol = { 0 };
- lvCol.mask = LVCF_TEXT;
- lvCol.pszText = TranslateT("Protocol");
- ListView_InsertColumn(hList, 0, &lvCol);
-
- LVITEM lvItem = { 0 };
- lvItem.mask = LVIF_TEXT|LVIF_PARAM;
- lvItem.iItem = 0;
- lvItem.iSubItem = 0;
-
- int count;
- PROTOACCOUNT** protos;
- ProtoEnumAccounts( &count, &protos );
-
- char dbSetting[128];
-
- for ( int i=0; i < count; i++ ) {
- if ( !IsSuitableProto( protos[i] ))
- continue;
-
- lvItem.pszText = Hlp_GetProtocolName( protos[i]->szModuleName );
- lvItem.lParam = (LPARAM)protos[i]->szModuleName;
- ListView_InsertItem(hList, &lvItem);
-
- _snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, protos[i]->szModuleName, SETTING_PROTO_ENABLED);
- ListView_SetCheckState(hList, lvItem.iItem, db_get_b(NULL, MODULENAME, dbSetting, 0));
- ListView_SetItem(hList, &lvItem);
- lvItem.iItem++;
- if (lvItem.pszText != NULL)
- free(lvItem.pszText);
- }
- if (bFromTrigger) {
- lvItem.pszText = TranslateT("<from trigger>");
- ListView_InsertItem(hList, &lvItem);
- lvItem.lParam = (LPARAM)STR_PROTOFROMTRIGGER;
- _snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, STR_PROTOFROMTRIGGER, SETTING_PROTO_ENABLED);
- ListView_SetCheckState(hList, lvItem.iItem, db_get_b(NULL, MODULENAME, dbSetting, 0));
- ListView_SetItem(hList, &lvItem);
- lvItem.iItem++;
- }
- ListView_SetColumnWidth(hList, 0, LVSCW_AUTOSIZE);
-}
-
-static void SaveProtoList(HWND hList, char *szPrefix, DWORD id)
-{
- LVITEM lvItem = { 0 };
- lvItem.mask = LVIF_PARAM;
- lvItem.iSubItem=0;
- for ( int i=0; i < ListView_GetItemCount(hList); i++ ) {
- lvItem.iItem=i;
- if (ListView_GetItem(hList, &lvItem) == FALSE)
- continue;
-
- char dbSetting[128];
- _snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s_%s", szPrefix, id, (const char*)lvItem.lParam, SETTING_PROTO_ENABLED);
- if (ListView_GetCheckState(hList, lvItem.iItem))
- db_set_b(NULL, MODULENAME, dbSetting, TRUE);
- else {
- log_debugA("deleting: %s", dbSetting);
- db_unset(NULL, MODULENAME, dbSetting);
- }
- }
-}
-
-static INT_PTR CALLBACK DlgProcOptsActionKeepStatus(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
-
- switch (msg) {
- case WM_INITDIALOG: {
- DWORD actionID;
- TRIGGERINFO ti;
-
- TranslateDialogDefault(hwndDlg);
- actionID = (DWORD)lParam;
- ZeroMemory(&ti, sizeof(TRIGGERINFO));
- ti.cbSize = sizeof(TRIGGERINFO);
- SendMessage(GetParent(hwndDlg), TM_GETTRIGGERINFO, 0, (LPARAM)&ti);
- BuildProtoList(GetDlgItem(hwndDlg, IDC_PROTOLIST), ti.dFlags&DF_PROTO?TRUE:FALSE, PREFIX_ACTIONID, actionID);
- CheckRadioButton(hwndDlg, IDC_ENABLECHECKING, IDC_DISABLECHECKING, DBGetActionSettingByte(actionID, NULL, MODULENAME, SETTING_ENABLECHECKING, FALSE)?IDC_ENABLECHECKING:IDC_DISABLECHECKING);
- break;
- }
-
- case TM_ADDACTION: { // save the settings
- DWORD actionID;
-
- actionID = (DWORD)wParam;
- DBWriteActionSettingByte(actionID, NULL, MODULENAME, SETTING_ENABLECHECKING, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ENABLECHECKING));
- SaveProtoList(GetDlgItem(hwndDlg, IDC_PROTOLIST), PREFIX_ACTIONID, actionID);
- break;
- }
-
- case WM_COMMAND:
- switch(LOWORD(wParam)) {
- case IDC_ENABLECHECKING:
- case IDC_DISABLECHECKING:
- CheckRadioButton(hwndDlg, IDC_ENABLECHECKING, IDC_DISABLECHECKING, LOWORD(wParam));
- break;
- }
- break;
- }
-
- return FALSE;
-}
-
-static int TriggerChecking(DWORD actionID, REPORTINFO *ri)
-{
- if (ri->flags & ACT_PERFORM) {
- BOOL checking = DBGetActionSettingByte(actionID, NULL, MODULENAME, SETTING_ENABLECHECKING, FALSE);
-
- int count;
- PROTOACCOUNT** protos;
- ProtoEnumAccounts( &count, &protos );
-
- for ( int i=0; i <count; i++ ) {
- if ( !IsSuitableProto( protos[i] ))
- continue;
-
- if (!ProtocolEnabled(actionID, PREFIX_ACTIONID, ri, protos[i]->szModuleName))
- continue;
-
- CallService(MS_KS_ENABLEPROTOCOL, (WPARAM)checking, (LPARAM)protos[i]->szModuleName);
- }
- }
- if (ri->flags & ACT_CLEANUP) {
- REMOVETRIGGERSETTINGS ras;
- ras.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- ras.prefix = PREFIX_ACTIONID;
- ras.id = actionID;
- ras.hContact = NULL;
- ras.szModule = MODULENAME;
- CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&ras);
- }
-
- return 0;
-}
-
-int RegisterAction()
-{
- if (!ServiceExists(MS_TRIGGER_REGISTERACTION))
- return -1;
-
- ACTIONREGISTER ai;
- ai.cbSize = sizeof(ai);
- ai.pszName = "KeepStatus: Enable/disable checking";
- ai.hInstance = hInst;
- ai.pfnDlgProc = DlgProcOptsActionKeepStatus;
- ai.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_KS_ACTION);
- ai.flags = ARF_FUNCTION;
- ai.actionFunction = TriggerChecking;
- return CallService(MS_TRIGGER_REGISTERACTION, 0, (LPARAM)&ai);
-}
-
-int DeInitAction() {
-
- return 0;
-}
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
index 72ec8a6c05..d852cd0a0a 100644
--- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
@@ -98,15 +98,6 @@ static int Exit(WPARAM wParam, LPARAM lParam);
extern int OptionsInit(WPARAM wparam,LPARAM lparam);
extern int InitCommonStatus();
-#define TRIGGERPLUGIN /* remove this to compile without it */
-
-#ifdef TRIGGERPLUGIN
-extern int RegisterAction();
-extern int DeInitAction();
-extern int RegisterTrigger();
-extern int DeInitTrigger();
-#endif
-
TConnectionSettings::TConnectionSettings( PROTOACCOUNT* pa )
{
cbSize = sizeof(PROTOCOLSETTINGEX);
@@ -1294,21 +1285,11 @@ int CSModuleLoaded(WPARAM wParam,LPARAM lParam)
hOptionsHook = HookEvent(ME_OPT_INITIALISE, OptionsInit);
hShutdownHook = HookEvent(ME_SYSTEM_OKTOEXIT, Exit);
hAccChangeHook = HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged);
-#ifdef TRIGGERPLUGIN
- RegisterAction();
- RegisterTrigger();
-#endif
-
return 0;
}
static int Exit(WPARAM wParam, LPARAM lParam)
{
-#ifdef TRIGGERPLUGIN
- DeInitTrigger();
- DeInitAction();
-#endif
-
UnhookEvent(hOptionsHook);
UnhookEvent(hShutdownHook);
UnhookEvent(hAccChangeHook);
diff --git a/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp
deleted file mode 100644
index 8421460d2f..0000000000
--- a/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "../commonstatus.h"
-#include "keepstatus.h"
-#include "../resource.h"
-#include <m_trigger.h>
-
-extern HINSTANCE hInst;
-static HANDLE hKeepStatusHook;
-
-static INT_PTR CALLBACK DlgProcOptsTriggerKeepStatus(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- /* lParam = (LPARAM)(DWORD)triggerID, or 0 if this is a new trigger */
- DWORD triggerID = (DWORD)lParam;
- CheckDlgButton(hwndDlg, IDC_CONNLOST, (DBGetTriggerSettingWord(triggerID, NULL, MODULENAME, SETTING_TRIGGERON, 0)&TRIGGER_CONNLOST)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOGINERROR, (DBGetTriggerSettingWord(triggerID, NULL, MODULENAME, SETTING_TRIGGERON, 0)&TRIGGER_LOGINERROR)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_OTHERLOC, (DBGetTriggerSettingWord(triggerID, NULL, MODULENAME, SETTING_TRIGGERON, 0)&TRIGGER_OTHERLOC)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CONNRETRY, (DBGetTriggerSettingWord(triggerID, NULL, MODULENAME, SETTING_TRIGGERON, 0)&TRIGGER_CONNRETRY)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CONNSUCCESS, (DBGetTriggerSettingWord(triggerID, NULL, MODULENAME, SETTING_TRIGGERON, 0)&TRIGGER_CONNSUCCESS)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CONNGIVEUP, (DBGetTriggerSettingWord(triggerID, NULL, MODULENAME, SETTING_TRIGGERON, 0)&TRIGGER_CONNGIVEUP)?BST_CHECKED:BST_UNCHECKED);
- break;
- }
-
- case WM_COMMAND:
- break;
-
- case TM_ADDTRIGGER:
- {
- // wParam = (WPARAM)(DWORD)triggerID
- DWORD triggerID;
- int flags;
-
- triggerID = (DWORD)wParam;
- flags = 0;
- flags |= IsDlgButtonChecked(hwndDlg, IDC_CONNLOST)?TRIGGER_CONNLOST:0;
- flags |= IsDlgButtonChecked(hwndDlg, IDC_LOGINERROR)?TRIGGER_LOGINERROR:0;
- flags |= IsDlgButtonChecked(hwndDlg, IDC_OTHERLOC)?TRIGGER_OTHERLOC:0;
- flags |= IsDlgButtonChecked(hwndDlg, IDC_CONNRETRY)?TRIGGER_CONNRETRY:0;
- flags |= IsDlgButtonChecked(hwndDlg, IDC_CONNSUCCESS)?TRIGGER_CONNSUCCESS:0;
- flags |= IsDlgButtonChecked(hwndDlg, IDC_CONNGIVEUP)?TRIGGER_CONNGIVEUP:0;
- DBWriteTriggerSettingWord(triggerID, NULL, MODULENAME, SETTING_TRIGGERON, (WORD)flags);
- break;
- }
-
- case TM_DELTRIGGER:
- {
- /* wParam = (WPARAM)(DWORD)triggerID */
- // wParam = triggerID
- DWORD triggerID;
- REMOVETRIGGERSETTINGS rts;
-
- triggerID = (DWORD)wParam;
- rts.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- rts.prefix = PREFIX_TRIGGERID;
- rts.id = triggerID;
- rts.hContact = NULL;
- rts.szModule = MODULENAME;
- CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&rts);
- break;
- }
-
- case WM_DESTROY:
- break;
- }
-
- return FALSE;
-}
-
-static int KeepStatusEvent(WPARAM wParam, LPARAM lParam) {
-
- DWORD triggerID;
- TRIGGERDATA td;
- int flags;
-
- triggerID = 0;
- do {
- triggerID = (DWORD)CallService(MS_TRIGGER_FINDNEXTTRIGGERID, triggerID, (LPARAM)TRIGGERNAME);
- if (triggerID == 0)
- continue;
-
- ZeroMemory(&td, sizeof(TRIGGERDATA));
- td.cbSize = sizeof(TRIGGERDATA);
- flags = DBGetTriggerSettingWord(triggerID, NULL, MODULENAME, SETTING_TRIGGERON, 0);
- switch (wParam) {
- case KS_CONN_STATE_LOST:
- if (!(flags&TRIGGER_CONNLOST))
- continue;
-
- td.dFlags |= DF_PROTO;
- td.szProto = (char *)lParam;
- break;
- case KS_CONN_STATE_LOGINERROR:
- if (!(flags&TRIGGER_LOGINERROR))
- continue;
-
- td.dFlags |= DF_PROTO;
- td.szProto = (char *)lParam;
- break;
- case KS_CONN_STATE_OTHERLOCATION:
- if (!(flags&TRIGGER_OTHERLOC))
- continue;
-
- td.dFlags |= DF_PROTO;
- td.szProto = (char *)lParam;
- break;
- case KS_CONN_STATE_RETRY:
- if (!(flags&TRIGGER_CONNRETRY))
- continue;
-
- break;
- case KS_CONN_STATE_STOPPEDCHECKING:
- if ( (lParam) && (!(flags&TRIGGER_CONNSUCCESS)))
- continue;
-
- if ( (!lParam) && (!(flags&TRIGGER_CONNGIVEUP)))
- continue;
-
- break;
-
- default:
- continue;
- }
-
- REPORTINFO ri = { 0 };
- ri.cbSize = sizeof(REPORTINFO);
- ri.flags = TRG_PERFORM;
- ri.triggerID = triggerID;
- ri.td = &td;
- CallService(MS_TRIGGER_REPORTEVENT, 0, (LPARAM)&ri);
- }
- while (triggerID != 0);
-
- return 0;
-}
-
-int RegisterTrigger()
-{
- if (!ServiceExists(MS_TRIGGER_REGISTERTRIGGER))
- return -1;
-
- hKeepStatusHook = HookEvent(ME_KS_CONNECTIONEVENT, KeepStatusEvent);
-
- TRIGGERREGISTER tr = { 0 };
- tr.cbSize = sizeof(TRIGGERREGISTER);
- tr.pszName = TRIGGERNAME;
- tr.hInstance = hInst;
- tr.pfnDlgProc = DlgProcOptsTriggerKeepStatus;
- tr.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_KS_TRIGGER);
- tr.dFlags = DF_PROTO;
- /* register the trigger at the TriggerPlugin */
- CallService(MS_TRIGGER_REGISTERTRIGGER, 0, (LPARAM)&tr);
-
- return 0;
-}
-
-int DeInitTrigger()
-{
- UnhookEvent(hKeepStatusHook);
- return 0;
-}