MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / report_status

Function report_status

src/iscguard/cntl_guard.cpp:245–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244
245static USHORT report_status(DWORD state, DWORD exit_code, DWORD checkpoint, DWORD hint)
246{
247/**************************************
248 *
249 * r e p o r t _ s t a t u s
250 *
251 **************************************
252 *
253 * Functional description
254 * Report our status to the control manager.
255 *
256 **************************************/
257 SERVICE_STATUS status;
258
259 status.dwServiceType = (SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS);
260 status.dwServiceSpecificExitCode = 0;
261
262 if (state == SERVICE_START_PENDING)
263 status.dwControlsAccepted = 0;
264 else
265 status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
266
267 status.dwCurrentState = current_state = state;
268 status.dwWin32ExitCode = exit_code;
269 status.dwCheckPoint = checkpoint;
270 status.dwWaitHint = hint;
271
272 const USHORT ret = SetServiceStatus(service_handle, &status);
273 if (!ret)
274 CNTL_shutdown_service("SetServiceStatus");
275
276 return ret;
277}

Callers 2

CNTL_main_threadFunction · 0.70
control_threadFunction · 0.70

Calls 1

CNTL_shutdown_serviceFunction · 0.70

Tested by

no test coverage detected