diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index 817d0cb9ab0..d216e096207 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -2684,6 +2684,7 @@ static void test_EventLog(void) DWORD size; BOOL ret; QUERY_SERVICE_CONFIGA *config; + SERVICE_STATUS_PROCESS status; scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_READ); ok(scm_handle != NULL, "OpenSCManager error %u\n", GetLastError()); @@ -2719,6 +2720,27 @@ todo_wine HeapFree(GetProcessHeap(), 0, config); + memset(&status, 0, sizeof(status)); + size = sizeof(status); + ret = QueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE *)&status, size, &size); + ok(ret, "QueryServiceStatusEx error %u\n", GetLastError()); + ok(status.dwServiceType == SERVICE_WIN32_SHARE_PROCESS || + status.dwServiceType == (SERVICE_WIN32_SHARE_PROCESS | SERVICE_WIN32_OWN_PROCESS) /* Win10 */, + "got %#x\n", status.dwServiceType); + ok(status.dwCurrentState == SERVICE_RUNNING, "got %#x\n", status.dwCurrentState); +todo_wine + ok(status.dwControlsAccepted == SERVICE_ACCEPT_SHUTDOWN /* XP */ || + status.dwControlsAccepted == (SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN) /* 2008 */ || + status.dwControlsAccepted == (SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_TIMECHANGE | SERVICE_ACCEPT_SHUTDOWN), + "got %#x\n", status.dwControlsAccepted); + ok(status.dwWin32ExitCode == 0, "got %#x\n", status.dwWin32ExitCode); + ok(status.dwServiceSpecificExitCode == 0, "got %#x\n", status.dwServiceSpecificExitCode); + ok(status.dwCheckPoint == 0, "got %#x\n", status.dwCheckPoint); + ok(status.dwWaitHint == 0, "got %#x\n", status.dwWaitHint); + ok(status.dwProcessId != 0, "got %#x\n", status.dwProcessId); + ok(status.dwServiceFlags == 0 || status.dwServiceFlags == SERVICE_RUNS_IN_SYSTEM_PROCESS /* XP */, + "got %#x\n", status.dwServiceFlags); + CloseServiceHandle(svc_handle); CloseServiceHandle(scm_handle); } diff --git a/include/winsvc.h b/include/winsvc.h index aa5e9f1ae88..768ba5bf9b8 100644 --- a/include/winsvc.h +++ b/include/winsvc.h @@ -85,6 +85,8 @@ static const WCHAR SERVICES_FAILED_DATABASEW[] = { 'S','e','r','v','i','c','e',' #define SERVICE_ACCEPT_POWEREVENT 0x00000040 #define SERVICE_ACCEPT_SESSIONCHANGE 0x00000080 #define SERVICE_ACCEPT_PRESHUTDOWN 0x00000100 +#define SERVICE_ACCEPT_TIMECHANGE 0x00000200 +#define SERVICE_ACCEPT_TRIGGEREVENT 0x00000400 /* Service Control Manager Object access types */ #define SC_MANAGER_CONNECT 0x0001 @@ -124,6 +126,7 @@ static const WCHAR SERVICES_FAILED_DATABASEW[] = { 'S','e','r','v','i','c','e',' #define SERVICE_NO_CHANGE 0xffffffff +#define SERVICE_RUNS_IN_SYSTEM_PROCESS 0x00000001 /* Handle types */