Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Service won't start
Message
From
11/10/2007 15:11:36
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Windows
Category:
Computing in general
Miscellaneous
Thread ID:
01260323
Message ID:
01260397
Views:
17
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform