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

Click here to load this message in the networking platform