Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running VFP application as a service
Message
From
23/11/2005 06:02:55
 
 
To
21/11/2005 08:46:57
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01070719
Message ID:
01071516
Views:
43
Hi,

Or there is something I miss in ALL examples I found in the internet (and tested), or there is no way to make a VFP app to run as a services, the way people posted their samples (at least those I found).

I stripped all unnecessary code from my program to make a sample test (I'll assemble it to the "real" program after making the test to work) and started it as a service. Result? "Error 1053: The service did not respond to the start or control request in a timely fashion.".

Below is the sample test I'm working with right now (based on ALL samples I could find...). What is the problem with it? It can run as a regular app, but not as a service.

I really appreciate any help!

Regards,

Fernando
 Procedure TASKsched 
*--------- ---------
 LParameters pAppStartDir   &&  Optional, depending on service registering

 Set SysMenu To

 On ShutDown FimProg ()

 With _Screen

     .Caption     = "TASKsched - " + Sys (0)
     .BackColor   = RGB (40, 121, 155)
     .Width       = 580
     .Height      = 166
     .AutoCenter  = .T.
     .BorderStyle =  2

 EndWith

 Application.Visible = .T.

*=============================================================================================
*                                       Main Loop
*=============================================================================================

 nTicks = 0

 oFoo = CreateObject ('_Timer')

 Read Events

 EndProc

*=============================================================================================

 Procedure FimProg
*--------- -------
 
 On    ShutDown
 Clear Events
 
 EndProc   

*=============================================================================================

 Define Class _timer as Timer

    Interval = 1000

    Procedure Timer

       nTicks = nTicks + 1

       Wait Window NoWait "Tick " + lTrim (Str (nTicks))

	EndProc

 EndDefine

*=============================================================================================
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform