Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Service won't start
Message
 
À
11/10/2007 12:11:02
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Windows
Catégorie:
Informatique en général
Divers
Thread ID:
01260323
Message ID:
01260374
Vues:
13
>
>The service did not respond to the start of cotrol requiest in a timely fashion.
>
>
>The EMPS.exe will run fine if I run it manually, but will not start as a service.

I've never tried creating a service with sc.exe, but in the .NET services I've created you have to return from the startup routine within a certain amount of time otherwise it assumes the service has failed. Generally, I'll start up another thread which does the real work so I can return immediately.

You could probably do something similar in VFP by starting up a timer:
PUBLIC goTimer

goTimer = CREATEOBJECT("tmrStartUp")

DEFINE CLASS tmrStartUp AS Timer
   Interval = 250
   Enabled = .T.
   
   FUNCTION Timer()
      This.Enabled = .F.
      * Call your real "main" code here.
   ENDFUNC
ENDDEFINE
It's not really multiple threads, but it may still work.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform