Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OnShutdown event in a Windows Service
Message
De
01/04/2014 08:43:40
 
 
À
01/04/2014 06:06:52
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01597504
Message ID:
01597861
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform