Konuyu Oyla:
  • Derecelendirme: 4/5 - 1 oy
  • 1
  • 2
  • 3
  • 4
  • 5
Windows Servislerini Kontrol Etmek
#2
uses WinSVC;

function isServiceRunning(ServiceName : AnsiString): Boolean;
var 
 aServiceControl : SC_Handle;
 aService : SC_Handle;
 status: TServiceStatus;
begin
 Result := False;
 aService := 0;
 aServiceControl := OpenSCManager(nil, nil, SC_MANAGER_CONNECT);
 if aServiceControl = 0 then Exit;
 try
   aService := OpenService(aServiceControl, PAnsiChar(ServiceName), SERVICE_QUERY_STATUS);
   if aService = 0 then Exit;
   if not QueryServiceStatus(aService, status)
     then Exit;
   Result := status.dwCurrentState = SERVICE_RUNNING;
 finally
   if aService <> 0 then CloseServiceHandle(aService);
   if aServiceControl <> 0 then CloseServiceHandle(aServiceControl)
 end;
end;
There's no place like 127.0.0.1
WWW
Cevapla


Bu Konudaki Yorumlar
Windows Servislerini Kontrol Etmek - Yazar: tgural - 09-10-2017, Saat: 10:59
Windows Servislerini Kontrol Etmek - Yazar: SimaWB - 09-10-2017, Saat: 12:35
Cvp: Windows Servislerini Kontrol Etmek - Yazar: tgural - 09-10-2017, Saat: 12:49
Windows Servislerini Kontrol Etmek - Yazar: r3n4m3 - 09-10-2017, Saat: 13:12
Windows Servislerini Kontrol Etmek - Yazar: SimaWB - 09-10-2017, Saat: 13:21

Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
Wink Tüm forum arkadaşlarıma merhaba, sizi davet etmek istiyorum emailx45 8 1.442 05-11-2025, Saat: 20:53
Son Yorum: emailx45
  Windows mediaplayer ol2.dcu sorunu diseqc 1 575 28-01-2025, Saat: 11:54
Son Yorum: diseqc
  Windows Explorer dan delphi formuna dosya Drag&Drop işlemi örneği adelphiforumz 1 572 23-01-2025, Saat: 15:16
Son Yorum: yhackup
  Rest Server Windows Sunucuda Yayınlama ugorkem 6 1.293 14-08-2024, Saat: 18:48
Son Yorum: ugorkem
  Çalışan Exe Formuna Müdahale Etmek SercanTEK 4 1.298 01-03-2024, Saat: 22:51
Son Yorum: SercanTEK



Konuyu Okuyanlar: 1 Ziyaretçi