Board index » delphi » How do I communicate with the Service Control Manager?
Mikael ?gren
![]() Delphi Developer |
Wed, 20 Feb 2002 03:00:00 GMT
|
Mikael ?gren
![]() Delphi Developer |
Wed, 20 Feb 2002 03:00:00 GMT
How do I communicate with the Service Control Manager?
Does anyone know how I can start, stop and check the status on a service
(through the SCM?)? I tried to use the OpenSCManager function to get a handle to the SCM but Anyone know how to solve this? Thanks, |
Reid Roma
![]() Delphi Developer |
Wed, 20 Feb 2002 03:00:00 GMT
Re:How do I communicate with the Service Control Manager?I got this from these forums at an earlier time: Looking for a way to check the status of Windows services? uses WinSvc; //------------------------------------- // connect to the service // if successful... // if successful... // close service handle // close service control Result := dwStat; Block #1 : Delphi code. Right click chkss.pas to download. Now that we have a basic function -- "ServiceGetStatus()" //------------------------------------- //------------------------------------- Block #2 : Delphi code. Right click chkss2.pas to download. Both "ServiceRunning()" and "ServiceStopped()" functions if( ServiceRunning( if( ServiceRunning( if( ServiceStopped( HTH Rkr Quote"Mikael ?gren" wrote: |
Mikael ?gre
![]() Delphi Developer |
Fri, 22 Feb 2002 03:00:00 GMT
Re:How do I communicate with the Service Control Manager?Thanks!! It really helped a lot!! /Micke |
1. Opening service control manager with no administror user
2. Opening service control manager with non-adminstrator user
3. Service Control Manager API help needed
4. Trying to communicate to an NT service
5. Best way to communicate with a service
6. Communicating with Control Panel
8. How To Check If MS SQL 7 Server Service Manager Is Running