C
Claire
Sorry for such a daft question.
Ive been following some tutorials on creating windows services. Ive not done
them before.
In my original debuggable windows form application, I create my worker
classes. The classes 'run' themselves using several threads and only stop
when the form is closed.
Now I've used these worker classes in the service application. When I try to
run my service manually, I am given a message that the service stopped
itself. I'm not sure if there's a problem with my code yet, but it led me
to wonder if the following code would just lead to my object being created
followed immediately by the function exiting and the service finishing. Is
there anything I need to do to keep driving a service application?
private MMonitor Monitor = null;
protected override void OnStart(string[] args)
{
Monitor = new MMonitor();
}
Ive been following some tutorials on creating windows services. Ive not done
them before.
In my original debuggable windows form application, I create my worker
classes. The classes 'run' themselves using several threads and only stop
when the form is closed.
Now I've used these worker classes in the service application. When I try to
run my service manually, I am given a message that the service stopped
itself. I'm not sure if there's a problem with my code yet, but it led me
to wonder if the following code would just lead to my object being created
followed immediately by the function exiting and the service finishing. Is
there anything I need to do to keep driving a service application?
private MMonitor Monitor = null;
protected override void OnStart(string[] args)
{
Monitor = new MMonitor();
}