home *** CD-ROM | disk | FTP | other *** search
- /*
- * Author : Ranveer Chandra
- * Directory: VirtualWiFi_Root\Service
- * File Name: Service.H
- * Purpose : Defines the main structures and values used by the Service
- */
-
- #ifndef _SERVICE_H
- #define _SERVICE_H
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- //////////////////////////////////////////////////////////////////////////////
- //// todo: change to desired strings
- ////
- // name of the executable
- #define SZAPPNAME "VirtualWiFiSvc"
- // internal name of the service
- #define SZSERVICENAME "VirtualWiFiService"
- // displayed name of the service
- #define SZSERVICEDISPLAYNAME "VirtualWiFi Client Service"
- // list of service dependencies - "dep1\0dep2\0\0"
- #define SZDEPENDENCIES ""
- //////////////////////////////////////////////////////////////////////////////
-
-
-
- //////////////////////////////////////////////////////////////////////////////
- //// todo: ServiceStart()must be defined by in your code.
- //// The service should use ReportStatusToSCMgr to indicate
- //// progress. This routine must also be used by StartService()
- //// to report to the SCM when the service is running.
- ////
- //// If a ServiceStop procedure is going to take longer than
- //// 3 seconds to execute, it should spawn a thread to
- //// execute the stop code, and return. Otherwise, the
- //// ServiceControlManager will believe that the service has
- //// stopped responding
- ////
- VOID ServiceStart(DWORD dwArgc, LPTSTR *lpszArgv);
- VOID ServiceStop();
-
- //////////////////////////////////////////////////////////////////////////////
-
-
-
- //////////////////////////////////////////////////////////////////////////////
- //// The following are procedures which
- //// may be useful to call within the above procedures,
- //// but require no implementation by the user.
- //// They are implemented in service.c
-
- //
- // FUNCTION: ReportStatusToSCMgr()
- //
- // PURPOSE: Sets the current status of the service and
- // reports it to the Service Control Manager
- //
- // PARAMETERS:
- // dwCurrentState - the state of the service
- // dwWin32ExitCode - error code to report
- // dwWaitHint - worst case estimate to next checkpoint
- //
- // RETURN VALUE:
- // TRUE - success
- // FALSE - failure
- //
- BOOL ReportStatusToSCMgr(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint);
-
-
- //
- // FUNCTION: AddToMessageLog(LPTSTR lpszMsg)
- //
- // PURPOSE: Allows any thread to log an error message
- //
- // PARAMETERS:
- // lpszMsg - text for message
- //
- // RETURN VALUE:
- // none
- //
- void AddToMessageLog(LPTSTR lpszMsg);
- //////////////////////////////////////////////////////////////////////////////
-
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-