win32_query_service_status

(PECL win32service >=0.1.0)

win32_query_service_statusBir hizmetin durumunu sorgular

Açıklama

win32_query_service_status(string $hizmet, string $makine = ?): mixed

Bir hizmetin mevcut durumunu sorgular ve sonucu bir dizi içinde döndürür.

Değiştirgeler

hizmet

Hizmetin kısa ismi.

makine

İsteğe bağlı olarak makine ismi. Belirtilmezse yerel makine ismi kullanılır.

Dönen Değerler

Başarısızlık durumunda false, aksi takdirde aşağıdaki bilgileri içeren bir dizi döner:

ServiceType

dwServiceType.

CurrentState

dwCurrentState.

ControlsAccepted

Hizmet tarafından kabul edilen hizmet denetimleri.

Win32ExitCode

Hizmet çıkmışsa sürecin çıkış kodu.

ServiceSpecificExitCode

Hizmet bir hata koduyla çıkmışsa olay günlüğündeki hizmete özgü kod.

CheckPoint

Hizmet sonlanmışsa geçerli sınama sayısı. Bu hizmet yöneticisi tarafından kısıtlanan bir hizmet sürecini saptamak için bir kalp atışı tarzında kullanılır. Bu değer en iyi WaitHint değeriyle birlikte değerlendirilir.

WaitHint

Hizmet sonlanmışsa geçerli sınama sayısının tamamının kullanıldığını belirtmek üzere sınama sayısı. Bir süreç göstergesi oluşturmak için kullanılabilir.

ProcessId

Windows süreç kimliği. Sıfırsa süreç çalışmıyor demektir.

ServiceFlags

dwServiceFlags.

add a note add a note

User Contributed Notes 1 note

up
1
demers dot alex at gmail dot com
14 years ago
This function will return an array containing the above information as a return value, but if this fails it will return an integer which is a System Error Code. All the System Error Codes can be found here:

http://msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx

In my case, it returned 5, in which I immediately knew why and fixed the issue right away.

In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:

ERROR_SERVICE_DOES_NOT_EXIST
1060 (0x424)
The specified service does not exist as an installed service.

Again, it should not return FALSE, instead an System Error Code for Windows.
To Top