Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP_Service will run - but not as a service
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
VFP_Service will run - but not as a service
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01078474
Message ID:
01078474
Vues:
71
The Service starts my program if run manually via timer...
DEFINE CLASS mytimer AS timer
      PROCEDURE timer
*            DO ("PDNC_JS.Exe" ) with this, oService
            DO ("vfpsrvrtn" ) with this, oService
            dtNow=DATETIME()     && read datetime() and seconds() close to the same instant
            nsec=SECONDS()
            nsec=CEILING((nsec+.5)/TIMERINT)*TIMERINT 
            dtTarget=DTOT(DATE())+nsec
            this.interval=(dtTarget-dtNow) * 1000
ENDDEFINE
After registering the service program successfully, I cannot run the service...
Error:
The srvODNC.EXE service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.

In this example---*And here is the code for vfpsrvrtn.prg
LPARAMETERS oTimer,oService
oService.logstr(PROGRAM())
Messagebeep(0)
CHRSAW(1)
Messagebeep(0)

The log is being filled out when executed from Run
Why can't the Service get launched as a service?

TIA
Edgar L. Bolton, B.S. B.B.A.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform