| 210 | |
| 211 | |
| 212 | static void WINAPI control_thread( DWORD action) |
| 213 | { |
| 214 | /************************************** |
| 215 | * |
| 216 | * c o n t r o l _ t h r e a d |
| 217 | * |
| 218 | ************************************** |
| 219 | * |
| 220 | * Functional description |
| 221 | * Process a service control request. |
| 222 | * |
| 223 | **************************************/ |
| 224 | const DWORD state = SERVICE_RUNNING; |
| 225 | |
| 226 | switch (action) |
| 227 | { |
| 228 | case SERVICE_CONTROL_STOP: |
| 229 | case SERVICE_CONTROL_SHUTDOWN: |
| 230 | report_status(SERVICE_STOP_PENDING, NO_ERROR, 1, 3000); |
| 231 | SetEvent(stop_event_handle); |
| 232 | return; |
| 233 | |
| 234 | case SERVICE_CONTROL_INTERROGATE: |
| 235 | break; |
| 236 | |
| 237 | default: |
| 238 | break; |
| 239 | } |
| 240 | |
| 241 | report_status(state, NO_ERROR, 0, 0); |
| 242 | } |
| 243 | |
| 244 | |
| 245 | static USHORT report_status(DWORD state, DWORD exit_code, DWORD checkpoint, DWORD hint) |
nothing calls this directly
no test coverage detected