summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/HistoryPlusPlus/hpp_external.pas21
-rw-r--r--plugins/HistoryPlusPlus/hpp_services.pas25
2 files changed, 13 insertions, 33 deletions
diff --git a/plugins/HistoryPlusPlus/hpp_external.pas b/plugins/HistoryPlusPlus/hpp_external.pas
index 95ea03a1bf..39eeff99fd 100644
--- a/plugins/HistoryPlusPlus/hpp_external.pas
+++ b/plugins/HistoryPlusPlus/hpp_external.pas
@@ -66,8 +66,7 @@ uses
{$include m_ieview.inc}
var
- hExtWindowIE, hExtEventIE, hExtNavigateIE, hExtOptChangedIE: THandle;
- hExtWindow, hExtEvent, hExtNavigate, hExtOptChanged: THandle;
+ hExtOptChangedIE, hExtOptChanged: THandle;
function _ExtWindow(wParam:WPARAM; lParam: LPARAM; GridMode: TExGridMode): uint_ptr;
var
@@ -253,14 +252,14 @@ begin
ImitateIEView := GetDBBool(hppDBName,'IEViewAPI',false);
if ImitateIEView then
begin
- hExtWindowIE := CreateServiceFunction(MS_IEVIEW_WINDOW,ExtWindowIEView);
- hExtEventIE := CreateServiceFunction(MS_IEVIEW_EVENT,ExtEventIEView);
- hExtNavigateIE := CreateServiceFunction(MS_IEVIEW_NAVIGATE,ExtNavigate);
+ CreateServiceFunction(MS_IEVIEW_WINDOW,@ExtWindowIEView);
+ CreateServiceFunction(MS_IEVIEW_EVENT,@ExtEventIEView);
+ CreateServiceFunction(MS_IEVIEW_NAVIGATE,@ExtNavigate);
hExtOptChangedIE := CreateHookableEvent(ME_IEVIEW_OPTIONSCHANGED);
end;
- hExtWindow := CreateServiceFunction(MS_HPP_EG_WINDOW,ExtWindowNative);
- hExtEvent := CreateServiceFunction(MS_HPP_EG_EVENT,ExtEventNative);
- hExtNavigate := CreateServiceFunction(MS_HPP_EG_NAVIGATE,ExtNavigate);
+ CreateServiceFunction(MS_HPP_EG_WINDOW,@ExtWindowNative);
+ CreateServiceFunction(MS_HPP_EG_EVENT,@ExtEventNative);
+ CreateServiceFunction(MS_HPP_EG_NAVIGATE,@ExtNavigate);
hExtOptChanged := CreateHookableEvent(ME_HPP_EG_OPTIONSCHANGED);
end;
@@ -268,14 +267,8 @@ procedure UnregisterExtGridServices;
begin
if ImitateIEView then
begin
- DestroyServiceFunction(hExtWindowIE);
- DestroyServiceFunction(hExtEventIE);
- DestroyServiceFunction(hExtNavigateIE);
DestroyHookableEvent(hExtOptChangedIE);
end;
- DestroyServiceFunction(hExtWindow);
- DestroyServiceFunction(hExtEvent);
- DestroyServiceFunction(hExtNavigate);
DestroyHookableEvent(hExtOptChanged);
ExternalGrids.Destroy;
end;
diff --git a/plugins/HistoryPlusPlus/hpp_services.pas b/plugins/HistoryPlusPlus/hpp_services.pas
index 84944c3c40..63234f2897 100644
--- a/plugins/HistoryPlusPlus/hpp_services.pas
+++ b/plugins/HistoryPlusPlus/hpp_services.pas
@@ -54,12 +54,6 @@ uses
HistoryForm, PassForm, PassCheckForm;
var
- hAllHistoryRichEditProcess,
- hHppShowHistory,
- hHppEmptyHistory,
- hHppGetVersion,
- hHppShowGlobalSearch,
- hHppOpenHistoryEvent,
hHppRichEditItemProcess: THandle;
HstWindowList: TList;
PassFm: TfmPass;
@@ -236,27 +230,20 @@ procedure hppRegisterServices;
begin
HstWindowList := TList.Create;
- hHppShowHistory := CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY,HppShowHistory);
- hHppEmptyHistory := CreateServiceFunction(MS_HPP_EMPTYHISTORY, HppEmptyHistory);
- hHppGetVersion := CreateServiceFunction(MS_HPP_GETVERSION, HppGetVersion);
- hHppShowGlobalSearch := CreateServiceFunction(MS_HPP_SHOWGLOBALSEARCH,HppShowGlobalSearch);
- hHppOpenHistoryEvent := CreateServiceFunction(MS_HPP_OPENHISTORYEVENT,HppOpenHistoryEvent);
+ CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY,@HppShowHistory);
+ CreateServiceFunction(MS_HPP_EMPTYHISTORY, @HppEmptyHistory);
+ CreateServiceFunction(MS_HPP_GETVERSION, @HppGetVersion);
+ CreateServiceFunction(MS_HPP_SHOWGLOBALSEARCH,@HppShowGlobalSearch);
+ CreateServiceFunction(MS_HPP_OPENHISTORYEVENT,@HppOpenHistoryEvent);
hHppRichEditItemProcess := CreateHookableEvent(ME_HPP_RICHEDIT_ITEMPROCESS);
- hAllHistoryRichEditProcess := HookEvent(ME_HPP_RICHEDIT_ITEMPROCESS,AllHistoryRichEditProcess);
+ HookEvent(ME_HPP_RICHEDIT_ITEMPROCESS,AllHistoryRichEditProcess);
end;
procedure hppUnregisterServices;
begin
CloseHistoryWindows;
CloseGlobalSearchWindow;
- UnhookEvent(hAllHistoryRichEditProcess);
- DestroyServiceFunction(hHppShowHistory);
- DestroyServiceFunction(hHppEmptyHistory);
- DestroyServiceFunction(hHppGetVersion);
- DestroyServiceFunction(hHppShowGlobalSearch);
- DestroyServiceFunction(hHppOpenHistoryEvent);
- DestroyServiceFunction(hHppEmptyHistory);
DestroyHookableEvent(hHppRichEditItemProcess);
HstWindowList.Free;
end;