https://git.reactos.org/?p=reactos.git;a=commitdiff;h=71408b531cf11e72a36ea…
commit 71408b531cf11e72a36ea71ebe8d645fbc6e75be
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Aug 4 19:58:50 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Aug 4 19:59:30 2019 +0200
[RPCSS] Prevent the RPCSS service from getting stopped
CORE-13500
---
base/services/rpcss/rpcss_main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/base/services/rpcss/rpcss_main.c b/base/services/rpcss/rpcss_main.c
index c515fa1a111..6eca3bab62e 100644
--- a/base/services/rpcss/rpcss_main.c
+++ b/base/services/rpcss/rpcss_main.c
@@ -91,7 +91,11 @@ static DWORD WINAPI service_handler( DWORD ctrl, DWORD event_type,
LPVOID event_
SERVICE_STATUS status;
status.dwServiceType = SERVICE_WIN32;
+#ifdef __REACTOS__
+ status.dwControlsAccepted = 0;
+#else
status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
+#endif
status.dwWin32ExitCode = 0;
status.dwServiceSpecificExitCode = 0;
status.dwCheckPoint = 0;
@@ -137,11 +141,19 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv )
status.dwServiceType = SERVICE_WIN32;
status.dwCurrentState = SERVICE_RUNNING;
+#ifdef __REACTOS__
+ status.dwControlsAccepted = 0;
+#else
status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
+#endif
status.dwWin32ExitCode = 0;
status.dwServiceSpecificExitCode = 0;
status.dwCheckPoint = 0;
+#ifdef __REACTOS__
+ status.dwWaitHint = 0;
+#else
status.dwWaitHint = 10000;
+#endif
SetServiceStatus( service_handle, &status );
#ifdef __REACTOS__