Rolf Kalbermatter r.kalbermatter@hccnet.nl writes:
r = QueryServiceStatusEx(handle, SC_STATUS_PROCESS_INFO, (LPBYTE)&svcStatusData,
sizeof(SERVICE_STATUS_PROCESS), &sz);
if (r)
{
switch (dwServiceType)
{
case SERVICE_DRIVER:
r = SERVICE_KERNEL_DRIVER == svcStatusData.dwServiceType ||
SERVICE_FILE_SYSTEM_DRIVER == svcStatusData.dwServiceType;
break;
case SERVICE_WIN32:
r = SERVICE_WIN32_OWN_PROCESS == svcStatusData.dwServiceType ||
SERVICE_WIN32_SHARE_PROCESS == svcStatusData.dwServiceType;
break;
default:
FIXME("Unknown dwServiceType: %x", dwServiceType);
r = FALSE;
break;
}
}
if (r)
{
Some sort of 'goto next' would be cleaner than this complex code to set r and then test it again and again.
}
sz = sizeof(name);
You probably meant namesz here.