09-10-2017, Saat: 12:49
(09-10-2017, Saat: 12:35)SimaWB Adlı Kullanıcıdan Alıntı: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;
Gün geçtikçe bu forumu daha çok seviyorum.. Büyüksün üstad.

