From 10091bbca1380a1d8e3b9d61b8c175490036af5b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 2 Dec 2016 22:21:55 +0300 Subject: old shit died now there's no need to create fake services & events --- plugins/Watrack/watrack.dpr | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'plugins/Watrack') diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr index c1c947704a..478ced86a1 100644 --- a/plugins/Watrack/watrack.dpr +++ b/plugins/Watrack/watrack.dpr @@ -417,14 +417,10 @@ begin NotifyEventHooks(hHookWATStatus,WAT_EVENT_PLUGINSTATUS,DisablePlugin); end; -function WaitAllModules(wParam:WPARAM;lParam:LPARAM):int;cdecl; +procedure WaitAllModules; stdcall; var ptr:pwModule; begin - result:=0; - - CallService(MS_SYSTEM_REMOVEWAIT,wParam,0); - ptr:=ModuleLink; while ptr<>nil do begin @@ -439,7 +435,6 @@ begin StartTimer; NotifyEventHooks(hHookWATLoaded,0,0); - CloseHandle(hEvent); end; procedure DoTheDew(load:boolean); @@ -561,13 +556,7 @@ begin end; // Load WATrack modules - hEvent:=CreateEvent(nil,true,true,nil); - if hEvent<>0 then - begin - p:='WAT_INIT'; - CreateServiceFunction(p,@WaitAllModules); - CallService(MS_SYSTEM_WAITONHANDLE,hEvent,tlparam(p)); - end; + Miranda_WaitOnHandle(@WaitAllModules, 0); LoadOpt; if DisablePlugin=dsPermanent then -- cgit v1.2.3