mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 22:18:13 +00:00
[RPCSS] Prevent the RPCSS service from getting stopped
CORE-13500
This commit is contained in:
parent
909bfff460
commit
71408b531c
1 changed files with 12 additions and 0 deletions
|
@ -91,7 +91,11 @@ static DWORD WINAPI service_handler( DWORD ctrl, DWORD event_type, LPVOID event_
|
||||||
SERVICE_STATUS status;
|
SERVICE_STATUS status;
|
||||||
|
|
||||||
status.dwServiceType = SERVICE_WIN32;
|
status.dwServiceType = SERVICE_WIN32;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
status.dwControlsAccepted = 0;
|
||||||
|
#else
|
||||||
status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
|
status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
|
||||||
|
#endif
|
||||||
status.dwWin32ExitCode = 0;
|
status.dwWin32ExitCode = 0;
|
||||||
status.dwServiceSpecificExitCode = 0;
|
status.dwServiceSpecificExitCode = 0;
|
||||||
status.dwCheckPoint = 0;
|
status.dwCheckPoint = 0;
|
||||||
|
@ -137,11 +141,19 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv )
|
||||||
|
|
||||||
status.dwServiceType = SERVICE_WIN32;
|
status.dwServiceType = SERVICE_WIN32;
|
||||||
status.dwCurrentState = SERVICE_RUNNING;
|
status.dwCurrentState = SERVICE_RUNNING;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
status.dwControlsAccepted = 0;
|
||||||
|
#else
|
||||||
status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
|
status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
|
||||||
|
#endif
|
||||||
status.dwWin32ExitCode = 0;
|
status.dwWin32ExitCode = 0;
|
||||||
status.dwServiceSpecificExitCode = 0;
|
status.dwServiceSpecificExitCode = 0;
|
||||||
status.dwCheckPoint = 0;
|
status.dwCheckPoint = 0;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
status.dwWaitHint = 0;
|
||||||
|
#else
|
||||||
status.dwWaitHint = 10000;
|
status.dwWaitHint = 10000;
|
||||||
|
#endif
|
||||||
SetServiceStatus( service_handle, &status );
|
SetServiceStatus( service_handle, &status );
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
|
|
Loading…
Reference in a new issue