Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Filename:
  4. service.h
  5. Abstract:
  6. Header for service.cpp
  7. Author:
  8. Wally Ho (wallyho) 31-Jan-2000
  9. Revision History:
  10. Created
  11. 7/27/2000 Added new names for the service to work.
  12. --*/
  13. #ifndef SERVICE_H
  14. #define SERVICE_H
  15. #include <windows.h>
  16. CONST LPTSTR SCM_DISPLAY_NAME = TEXT("Idwlog Service");
  17. CONST LPTSTR SCM_SERVICE_NAME = TEXT("Idwlog");
  18. BOOL RemoveService(LPTSTR szServiceNameSCM);
  19. BOOL InstallService(LPTSTR szServiceNameSCM,
  20. LPTSTR szServiceLabel,
  21. LPTSTR szExeFullPath);
  22. VOID ServiceMain(DWORD argc, LPTSTR *argv);
  23. BOOL InitService();
  24. VOID ResumeService();
  25. VOID PauseService();
  26. VOID StopService();
  27. BOOL SendStatusToSCM ( DWORD dwCurrentState,
  28. DWORD dwWin32ExitCode,
  29. DWORD dwServiceSpecificExitCode,
  30. DWORD dwCheckPoint,
  31. DWORD dwWaitHint);
  32. VOID ServiceCtrlHandler (DWORD controlCode);
  33. VOID Terminate(DWORD error);
  34. DWORD ServiceThread(LPDWORD param);
  35. #endif
  36. /*
  37. class CService{
  38. public:
  39. BOOL RemoveService(LPTSTR szServiceNameSCM);
  40. BOOL InstallService(LPTSTR szServiceNameSCM,
  41. LPTSTR szServiceLabel,
  42. LPTSTR szExeFullPath);
  43. VOID friend ServiceMain(DWORD argc, LPTSTR *argv);
  44. ~CService();
  45. CService();
  46. private:
  47. BOOL InitService();
  48. VOID ResumeService();
  49. VOID PauseService();
  50. VOID StopService();
  51. BOOL SendStatusToSCM ( DWORD dwCurrentState,
  52. DWORD dwWin32ExitCode,
  53. DWORD dwServiceSpecificExitCode,
  54. DWORD dwCheckPoint,
  55. DWORD dwWaitHint);
  56. VOID ServiceCtrlHandler (DWORD controlCode);
  57. VOID Terminate(DWORD error);
  58. DWORD ServiceThread(LPDWORD param);
  59. DWORD friend WINAPI ServiceThreadStub( IN CService* csv );
  60. };
  61. #endif
  62. */