mirror of
https://github.com/reactos/reactos.git
synced 2024-11-27 05:23:33 +08:00
[RPCSS] Prevent the RPCSS service from getting stopped
CORE-13500
This commit is contained in:
parent
909bfff460
commit
71408b531c
@ -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__
|
||||
|
Loading…
Reference in New Issue
Block a user