BOOL WINAPI EnumServicesStatusEx(_In_ SC_HANDLE hSCManager,_In_ SC_ENUM_TYPE InfoLevel,_In_ DWORD dwServiceType,_In_ DWORD dwServiceState,_Out_opt_ LPBYTE lpServices,_In_ DWORD cbBufSize,_Out_ LPDWORD pcbBytesNeeded,_Out_ LPDWORD lpServicesReturned,_Inout_opt_ LPDWORD lpResumeHandle,_In_opt_ LPCTSTR pszGroupName);
| Value | Meaning |
|---|---|
|
Services of type SERVICE_KERNEL_DRIVER and SERVICE_FILE_SYSTEM_DRIVER. |
|
File system driver services. |
|
Driver services. |
|
Services of type SERVICE_WIN32_OWN_PROCESS and SERVICE_WIN32_SHARE_PROCESS. |
|
Services that run in their own processes. |
|
Services that share a process with one or more other services. For more information, see Service Programs. |
| Return code | Description |
|---|---|
|
The handle does not have the SC_MANAGER_ENUMERATE_SERVICE access right. |
|
The buffer is too small. Not all data in the active database could be returned. The pcbBytesNeeded parameter contains the number of bytes required to receive the remaining entries. |
|
An illegal parameter value was used. |
|
The handle is invalid. |
|
The InfoLevel parameter contains an unsupported value. |
|
The system is shutting down; this function cannot be called. |
