Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OnShutdown event in a Windows Service
Message
From
01/04/2014 08:43:40
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01597504
Message ID:
01597861
Views:
22
>Hmm. I just tried implementing the SERVICE_ACCEPT_PRESHUTDOWN option but can't get it to work either (Win 7). I can set the private field in OnStart and verify that the value has changed - but if I look at the running service using the ServiceController then the 'commandsAccepted' value is still 5 (rather than 261) and, of course, the OnCustomCommand doesn't fire for shutdown.
>
>I'll try the ADVAPI32.DLL SetServiceStatus approach if I get time.....

That seems to be exactly what I have faced so far.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform