Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect Windows Service Stop
Message
 
 
To
13/07/2007 15:39:21
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01240349
Message ID:
01240353
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform