if (!sshStatusHandle)
goto cleanup;
- DbgPrint("Starting service\n");
-
// SERVICE_STATUS members that don't change in example
//
ssStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
3000)) // wait hint
goto cleanup;
- DbgPrint("Starting service 2\n");
-
- SetConsoleCtrlHandler( ControlHandler, TRUE );
-
ServiceStart( dwArgc, lpszArgv );
- DbgPrint("Done\n");
-
cleanup:
// try to report the stopped status to the service control manager.
// Handle the requested control code.
//
- DbgPrint("service_ctrl called\n");
-
switch (dwCtrlCode)
{
// Stop the service.
// ServiceStop(). This avoids a race condition
// which may result in a 1053 - The Service did not respond...
// error.
-#ifdef __REACTOS__
- case SERVICE_CONTROL_SHUTDOWN:
-#endif
case SERVICE_CONTROL_STOP:
- DbgPrint("for stop\n");
ReportStatusToSCMgr(SERVICE_STOP_PENDING, NO_ERROR, 0);
ServiceStop();
- DbgPrint("Done\n");
return;
// Update the service status.
if (dwCurrentState == SERVICE_START_PENDING)
ssStatus.dwControlsAccepted = 0;
else
-#ifndef __REACTOS__
ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
-#else
- ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
-#endif
ssStatus.dwCurrentState = dwCurrentState;
ssStatus.dwWin32ExitCode = dwWin32ExitCode;