| 162 | } |
| 163 | |
| 164 | void NTAPI |
| 165 | ManagerServiceEntry(DWORD argc, char**argv) |
| 166 | { |
| 167 | // register the service control handler |
| 168 | ServiceHandle = |
| 169 | RegisterServiceCtrlHandler( |
| 170 | "Ext2Mgr", |
| 171 | ManagerCtrlService ); |
| 172 | |
| 173 | if (ServiceHandle == 0) { |
| 174 | return; |
| 175 | } |
| 176 | |
| 177 | // setup standard service state values |
| 178 | ServiceStatus.dwServiceType = SERVICE_WIN32 | SERVICE_INTERACTIVE_PROCESS; |
| 179 | ServiceStatus.dwServiceSpecificExitCode = 0; |
| 180 | |
| 181 | // report our status to the SCM |
| 182 | if (!ManagerReportStatus( |
| 183 | ServiceHandle, |
| 184 | &ServiceStatus, |
| 185 | SERVICE_START_PENDING, |
| 186 | NO_ERROR, |
| 187 | 600000 |
| 188 | )) |
| 189 | { |
| 190 | ManagerReportStatus( |
| 191 | ServiceHandle, |
| 192 | &ServiceStatus, |
| 193 | SERVICE_STOPPED, |
| 194 | NO_ERROR, |
| 195 | 0); |
| 196 | return; |
| 197 | } |
| 198 | |
| 199 | // Now start the service for real |
| 200 | _beginthread(ManagerStartMain, 0, (PVOID)TRUE); |
| 201 | return; |
| 202 | } |
| 203 | |
| 204 | |
| 205 | VOID |
nothing calls this directly
no test coverage detected