}\r
}\r
\r
+TCHAR *service_status_text(unsigned long status) {\r
+ switch (status) {\r
+ case SERVICE_STOPPED: return _T("SERVICE_STOPPED");\r
+ case SERVICE_START_PENDING: return _T("SERVICE_START_PENDING");\r
+ case SERVICE_STOP_PENDING: return _T("SERVICE_STOP_PENDING");\r
+ case SERVICE_RUNNING: return _T("SERVICE_RUNNING");\r
+ case SERVICE_CONTINUE_PENDING: return _T("SERVICE_CONTINUE_PENDING");\r
+ case SERVICE_PAUSE_PENDING: return _T("SERVICE_PAUSE_PENDING");\r
+ case SERVICE_PAUSED: return _T("SERVICE_PAUSED");\r
+ default: return 0;\r
+ }\r
+}\r
+\r
void log_service_control(TCHAR *service_name, unsigned long control, bool handled) {\r
TCHAR *text = service_control_text(control);\r
unsigned long event;\r
\r
void WINAPI service_main(unsigned long, TCHAR **);\r
TCHAR *service_control_text(unsigned long);\r
+TCHAR *service_status_text(unsigned long);\r
void log_service_control(TCHAR *, unsigned long, bool);\r
unsigned long WINAPI service_control_handler(unsigned long, unsigned long, void *, void *);\r
\r