I'm trying to understand the difference between OnStart()
and the constructor in a ServiceBase
derived class. From reading around it seems that the first time you start a service (after turning on your machine), the constructor is called. Thereafter, you can stop and start the service as many times as you like, but the constructor will never be called again, only the OnStart()
method will be called each time. Can anyone confirm?
Thanks