D5 NT Services & Thread messages
Posted on 2000-03-08
I have written an NT service in D5 which spawns multiple threads to perform various tasks and generally all works fine.
The main problem I have is posting a message back to the main service thread when each spawned thread is finished (terminated). The code snippet is below.
In the Terminate Method of the Thread I have :
procedure TSapSMUHourThread.Terminate ;
inherited Terminate ;
In the Main service I have const & message handler declared as :
wm_ThreadDoneMsg = wm_User + 8 ;
procedure TService_CDMS_CS.ThreadDone(var AMessage : TMessage); message ;
I have debugged this and this message handler is definitely NOT activated.
Does anyone have any ideas ??
thanks in advance.