Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Service won't start
Message
De
11/10/2007 15:11:36
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:
01260397
Vues:
18
So, this would go into MyMainProgram, but all the code I currently have in there would go into the timer function? What is the logic with this? Why might this work?

UPDATE: You say to "Call" my real main code, meaning it is a separate program, or can I just put the code in there? Probably either one, but want to make sure because maybe that makes a difference.

UPDATE2: It didn't seem to make a difference. It just times-out after 30 seconds in the DOS window.

>>
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform