Regular service written in Delphi XE7 (windows 10 22H2). In OnStart Event I create some objects, I read inifile etc. StartType = stAuto. Windows service set up: automatically.
When my service state is:
- running during system shutdown (by shut down system option) it starts at system startup but without calling services' OnStart Event. Just like resumed from the point it stopped working.
- running during system shutdown (by restart system option) it starts at system startup but with OnStart Event called.
- stopped at both previous conditions it does not start at all.
Is it normal behaviour or I'm missing somethig?