Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automate starting & stopping of NT service in VFP code
Message
 
 
À
01/11/2000 12:43:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00436756
Message ID:
00440657
Vues:
25
>I need to start and stop an NT service based on events in a VFP app. Does anyone have any ideas on how to do this?

You can use ADSI for this. You can get a COM reference to the service and start and stop it at will.

oservice = getobject("WinNT://MyComputer/Myservice,service")
oservice.Start
oservice.Stop

Check out MSDN for more information. http://msdn.microsoft.com/library/psdk/adsi/adsistartpage_7wrp.htm
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform