EnumServicesStatus function advapi32

int EnumServicesStatus(
  1. int hSCManager,
  2. int dwServiceType,
  3. int dwServiceState,
  4. Pointer<ENUM_SERVICE_STATUS> lpServices,
  5. int cbBufSize,
  6. Pointer<Uint32> pcbBytesNeeded,
  7. Pointer<Uint32> lpServicesReturned,
  8. Pointer<Uint32> lpResumeHandle,
)

Enumerates services in the specified service control manager database. The name and status of each service are provided.

BOOL EnumServicesStatusW(
  [in]                SC_HANDLE              hSCManager,
  [in]                DWORD                  dwServiceType,
  [in]                DWORD                  dwServiceState,
  [out, optional]     LPENUM_SERVICE_STATUSW lpServices,
  [in]                DWORD                  cbBufSize,
  [out]               LPDWORD                pcbBytesNeeded,
  [out]               LPDWORD                lpServicesReturned,
  [in, out, optional] LPDWORD                lpResumeHandle
);

Implementation

int EnumServicesStatus(
        int hSCManager,
        int dwServiceType,
        int dwServiceState,
        Pointer<ENUM_SERVICE_STATUS> lpServices,
        int cbBufSize,
        Pointer<Uint32> pcbBytesNeeded,
        Pointer<Uint32> lpServicesReturned,
        Pointer<Uint32> lpResumeHandle) =>
    _EnumServicesStatus(hSCManager, dwServiceType, dwServiceState, lpServices,
        cbBufSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle);