From 7a948f1ef804ecd9971b0869e0591c22944fa6da Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 2 Oct 2019 20:42:44 +0300 Subject: merge with SrmmLogContainer --- plugins/HistoryPlusPlus/historypp.dpr | 8 ++++++-- plugins/HistoryPlusPlus/historypp.dproj | 32 ++++++++++++++++---------------- plugins/HistoryPlusPlus/hpp_global.pas | 3 +++ 3 files changed, 25 insertions(+), 18 deletions(-) (limited to 'plugins/HistoryPlusPlus') diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr index a9843a5d2a..71841fb8bf 100644 --- a/plugins/HistoryPlusPlus/historypp.dpr +++ b/plugins/HistoryPlusPlus/historypp.dpr @@ -23,8 +23,6 @@ {.$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} library historypp; -{$IMAGEBASE $02630000} - {$R 'hpp_resource.res' 'hpp_resource.rc'} {$R 'version.res'} {$R 'hpp_opt_dialog.res' 'hpp_opt_dialog.rc'} @@ -112,6 +110,9 @@ var HookMetaDefaultChanged, HookPreshutdown: THandle; +procedure RegisterHppLogger; stdcall; external AppDll; +procedure UnregisterHppLogger; stdcall; external AppDll; + function OnModulesLoad(awParam:WPARAM; alParam:LPARAM):int; cdecl; forward; function OnSettingsChanged(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward; function OnSmAddSettingsChanged(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward; @@ -499,6 +500,7 @@ function OnPreshutdown(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; begin Result := 0; NotifyAllForms(HM_MIEV_PRESHUTDOWN,0,0); + UnregisterHppLogger; end; exports @@ -509,6 +511,8 @@ exports begin DisableThreadLibraryCalls(hInstance); + RegisterHppLogger; + PluginInfo.cbSize:= SizeOf(TPLUGININFOEX); PluginInfo.shortName:= hppShortNameV; PluginInfo.version:= hppVersion; diff --git a/plugins/HistoryPlusPlus/historypp.dproj b/plugins/HistoryPlusPlus/historypp.dproj index fe85622dc8..4387bf178e 100644 --- a/plugins/HistoryPlusPlus/historypp.dproj +++ b/plugins/HistoryPlusPlus/historypp.dproj @@ -114,31 +114,31 @@ true ..\..\include\delphi;..\..\plugins\ExternalAPI\delphi;$(DCC_UnitSearchPath) true - ..\..\bin15\Debug\Plugins\ + ..\..\bin16\Debug\Plugins\ ..\..\bin15\temp\res\ - ..\..\bin15\Debug\Plugins\ + ..\..\bin16\Debug\Plugins\ 1033 - ..\..\bin15\Debug\Obj\hpp\ + ..\..\bin16\Debug\Obj\hpp\ None - ..\..\bin15\Debug\Obj\hpp\ + ..\..\bin16\Debug\Obj\hpp\ - D:\Myranda\bin15\Debug64 + D:\Myranda\bin16\Debug64 true - D:\Myranda\bin15\Debug64\Miranda64.exe + D:\Myranda\bin16\Debug64\Miranda64.exe ..\..\bin15\temp\res\ - ..\..\bin15\Debug64\Plugins\ - ..\..\bin15\Debug64\Plugins\ - ..\..\bin15\Debug64\Obj\hpp\ - ..\..\bin15\Debug64\Obj\hpp\ + ..\..\bin16\Debug64\Plugins\ + ..\..\bin16\Debug64\Plugins\ + ..\..\bin16\Debug64\Obj\hpp\ + ..\..\bin16\Debug64\Obj\hpp\ - ..\..\bin15\Debug\Plugins\ - ..\..\bin15\Debug\Plugins\ - ..\..\bin15\Debug\Obj\hpp\ - ..\..\bin15\Debug\Obj\hpp\ - W:\miranda-ng\bin15\Debug - W:\miranda-ng\bin15\Debug\Miranda32.exe + ..\..\bin16\Debug\Plugins\ + ..\..\bin16\Debug\Plugins\ + ..\..\bin16\Debug\Obj\hpp\ + ..\..\bin16\Debug\Obj\hpp\ + W:\miranda-ng\bin16\Debug + W:\miranda-ng\bin16\Debug\Miranda32.exe true diff --git a/plugins/HistoryPlusPlus/hpp_global.pas b/plugins/HistoryPlusPlus/hpp_global.pas index 38ae093051..9bae1efa3c 100644 --- a/plugins/HistoryPlusPlus/hpp_global.pas +++ b/plugins/HistoryPlusPlus/hpp_global.pas @@ -580,6 +580,9 @@ var begin WSize := (Length(WideStr)+1)*SizeOf(WideChar); if WSize = SizeOf(WideChar) then exit; + if CodePage = 1200 then + CodePage := CP_ACP; + AnsiStr := WideToAnsiString(WideStr,CodePage); ASize := Length(AnsiStr)+1; OpenClipboard(Handle); -- cgit v1.2.3