Windows Services

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have Windows Service which is working fine, under stop event of this
service under one condition I need to cancel the stop event. i.e come out of
"Protected Overrides Sub OnStop() End Sub" procedure.

And still continue the service running.

How can I do this.

Regards,
Mustaq
 
See if CanStop property can be used in your situation. Remember this
property is checked before OnStop() is called.

Hi,

I have Windows Service which is working fine, under stop event of this
service under one condition I need to cancel the stop event. i.e come out of
"Protected Overrides Sub OnStop() End Sub" procedure.

And still continue the service running.

How can I do this.

Regards,
Mustaq
 
You might want to check the condition (that stops Cancel event) periodically
(perhaps using Timer) and set the CanStop property to False or True.

Hi Siva,

Thanks for Info....any Idea which event is before this.

Thanks!
Mustaq
 
Back
Top