🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15020

Re: Stop and startng a service

#15020
From: Vladimir Afanasyev
Date: Tue, 22 Jul 2003 06:38
22 lines
2023 bytes
Hi,

"Maurice Anderson" <mauriceanderson@hotmail.com> wrote:
>Giuliano,
>
>Thanks.  I am not sure what I am doing when I put FSCM( 0, "MyServiceName" )
>in the contructor heading.  Maybe  need to study up on that.
>
>1.)  What is FSCM?
>2.)  Is there a way to instantiate it with the new keyword?
>3.)  Will this code allow me to stop and start an existing service?
>4.)  For example, I wanted to stop and start the Tcpip service on
>      a Windows 2000 workstation, how would I do this?
>

For Win2000 you can use WMI (Windows Management Instrumentation). 
WMI is native for Win2000 as well as for WinXP.
You can download sample for Start and Stop service:
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=19443

Vladimir.
Technical Details
Message-ID: <3f1cdc00@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3f163941$1@newsgroups.borland.com> <mdhchv8i6dsqrsemn6heka3sk41uj4cckg@4ax.com> <rghchv4m3v4qqrv0uqpg359inhsjm8i4kv@4ax.com> <3f17020b$1@newsgroups.borland.com> <8u2ehv8kjhckfkiijvbu2pq34p6pq5607m@4ax.com> <3f1715bd@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,80e98d9661a7c48a
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-22 00:03:17 PST
From: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Subject: Re: Stop and startng a service
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 212.82.216.226 212.82.216.226    
X-Forwarded-For: 192.168.0.147
References: <3f163941$1@newsgroups.borland.com> <mdhchv8i6dsqrsemn6heka3sk41uj4cckg@4ax.com> <rghchv4m3v4qqrv0uqpg359inhsjm8i4kv@4ax.com> <3f17020b$1@newsgroups.borland.com> <8u2ehv8kjhckfkiijvbu2pq34p6pq5607m@4ax.com> <3f1715bd@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f1cdc00@newsgroups.borland.com>
Date: 21 Jul 2003 23:38:56 -0700
X-Trace: newsgroups.borland.com 1058855936 207.105.83.65 (21 Jul 2003 23:38:56 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail