Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detect Windows Service Stop
Message
 
 
À
13/07/2007 15:39:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01240349
Message ID:
01240353
Vues:
16
>I have a VFP8 program starting as a Windows Service and running under the Local System user. I used the MS utilities INSTSRV.EXE and SRVANY.EXE to create the registry entries for the service, and the program does successfully Start and Stop.
>
>The problem is that the program opens up a file, and when the service is Stopped (manually through Services), there is a .tmp file being left in the Windows\Temp folder because the file in the program is not being properly closed when the Stop is issued.
>
>Is there a way for a program to detect that the service that started it has stopped? I use "On Shutdown" to detect a reboot, and that works fine, but it sure doesn't detect the service stopping.
>
>Thanks,
>Curt

Would this work for you http://www.berezniker.com/display/VFP/Windows+Service+Status ?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform