Hi All,
Pl excuse if this mail is not relevant.
I’ve a service application. The service is running in the
LOCAL_SYSTEM_ACCOUNT. If I stop the service thru Control Panel -> Services
applet, all of my uninitialization code as part of SERVICE_CONTROL_STOP is
getting executed and the shutdown is proper. If I shutdown the system
without stopping the service, I’m suspecting that my uninitlaization code is
not getting executed. I’ve a doubt that SERVICE_CONTROL_STOP is not issued
by the service control manager to my service.
Note : I’m using NT 4.0 SP 6.0 (NT Workstation).
Pl correct me if the above assumption is wrong. Also, throw some ideas on
how to deal with this scenario.
Thanks,
Sudarsan
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You’re probably getting a SERVICE_CONTROL_SHUTDOWN at shutdown time, not a
SERVICE_CONTROL_STOP. Put your ‘uninit’ code in a common routine and call it
for both messages.
By default, you get 20 seconds from the shutdown message to clean up. The
SCM will wait that long for you, if you acknowledge it’s message properly
(SERVICE_STOP_PENDING I think). However, a clever user can edit their
registry and reduce this shutdown time to whatever they wish (mine is set to
5 seconds). If you have data that needs to be flushed to disk, then consider
that.
ERX
-----Original Message-----
From: Sarma, S [mailto:xxxxx@perkinelmer.com]
Sent: Wednesday, March 14, 2001 2:44 PM
To: NT Developers Interest List
Subject: [ntdev] SERVICE_CONTROL_STOP
Hi All,
Pl excuse if this mail is not relevant.
I’ve a service application. The service is running in the
LOCAL_SYSTEM_ACCOUNT. If I stop the service thru Control
Panel -> Services
applet, all of my uninitialization code as part of
SERVICE_CONTROL_STOP is
getting executed and the shutdown is proper. If I shutdown the system
without stopping the service, I’m suspecting that my
uninitlaization code is
not getting executed. I’ve a doubt that SERVICE_CONTROL_STOP
is not issued
by the service control manager to my service.
Note : I’m using NT 4.0 SP 6.0 (NT Workstation).
Pl correct me if the above assumption is wrong. Also, throw
some ideas on
how to deal with this scenario.
Thanks,
Sudarsan
You are currently subscribed to ntdev as: xxxxx@mediasite.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com