Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running as service
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00687224
Message ID:
00688215
Vues:
20
I have this simple program for testing:
***********
SYS(2340, 1)

DECLARE Sleep IN kernel32 integer delay
FOR lnCount = 1 TO 5
Sleep(2000)
lcAlias = 'test' + STRTRAN(TIME(), ':', '')
CREATE TABLE (lcAlias) FREE (ff c(4))
USE IN (lcAlias)
ENDFOR
***********

It works as an executable.
I added that program to services using that:
instsvr servicetest \srvany.exe

It added my service.

Then I modified registry (Article Q137890)

I am trying to start my service and it does not start. Error #1053.

Any help, please? I am using WInXP Pro, VFP7.


I've never done any window services but I've work a lot with COM/COM+ and debugging can be a pain in the rear. What I do is use the STRTOFILE() command to get a log of error as they occur. For example:

Create Table (lcAlias) Free (ff c(4))

lnErrors = Aerror(laErr)
If lnError > 0
for lni = 1 to lnErrors
STRTOFILE(laErr(lnErrors,1),'c:\temp\error.log',1)
STRTOFILE(laErr(lnErrors,2),'c:\temp\error.log',1)
STRTOFILE(laErr(lnErrors,3),'c:\temp\error.log',1)
STRTOFILE(laErr(lnErrors,4),'c:\temp\error.log',1)
STRTOFILE(laErr(lnErrors,5),'c:\temp\error.log',1)
STRTOFILE(laErr(lnErrors,6),'c:\temp\error.log',1)
STRTOFILE(laErr(lnErrors,7),'c:\temp\error.log',1)
next lni
EndIf
...

Hope this helps... Good luck!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform