| 34 | } |
| 35 | |
| 36 | void start() // starts the server again on a new thread and returns once the windows service has stopped |
| 37 | { |
| 38 | SERVICE_TABLE_ENTRY dispatchtable[] = { { (LPSTR)name, (LPSERVICE_MAIN_FUNCTION)callbacks::main }, { NULL, NULL } }; |
| 39 | if(StartServiceCtrlDispatcher(dispatchtable)) exit(EXIT_SUCCESS); |
| 40 | else fatal("an error occurred running the AC server as windows service. make sure you start the server from the service control manager and not from the command line."); |
| 41 | } |
| 42 | |
| 43 | void keepalive() |
| 44 | { |