- /* Lets setup the Arg structure */
- ArgDetails.argc = argc;
- ArgDetails.argv = argv;
-
-#ifdef WIN32
-
- /* Now setup the service with the service controller */
- SetupService(argc, argv, &ArgDetails, SZAPPNAME, SZSERVICENAME, SZSERVICEDISPLAYNAME, SZDEPENDENCIES);
-
-#else /* WIN32 */
-
- /* The service controller does the following for us under windows */
- if (StartAppService(NULL, argc, argv))
- RunAppService(&ArgDetails);
-
- /* Ensure the service has been stopped */
- StopAppService(NULL);
-
-#endif /* WIN32 */
-
- return(0);
-}
-
-int StartAppService(void *pHandle, int argc, char **argv)
-{
- /* Initializes the App */
- return 1;
-}
-
-void RunAppService(void *pHandle)
-{
- Args *pArgs = (Args *)pHandle;
-
- /* Starts the app running */
- statserv_main(pArgs->argc, pArgs->argv);
-}
-
-void StopAppService(void *pHandle)
-{
- /* Stops the app */
- statserv_closedown();