Leaked source code of windows server 2003
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.

58 lines
1.6 KiB

  1. //#--------------------------------------------------------------
  2. //
  3. // File: myservice.h
  4. //
  5. // Synopsis: This file holds the declaration of the
  6. // CMainWindow class
  7. //
  8. // History: 11/10/2000 serdarun Created
  9. //
  10. // Copyright (C) 1999-2000 Microsoft Corporation
  11. // All rights reserved.
  12. //
  13. //#--------------------------------------------------------------
  14. #ifndef _MYSERVICE_H_
  15. #define _MYSERVICE_H_
  16. //You may derive a class from CComModule and use it if you want to override
  17. //something, but do not change the name of _Module
  18. class CServiceModule : public CComModule
  19. {
  20. public:
  21. HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);
  22. HRESULT UnregisterServer();
  23. void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID,
  24. UINT nServiceShortNameID, const GUID* plibid = NULL);
  25. void Start();
  26. void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
  27. void Handler(DWORD dwOpcode);
  28. void Run();
  29. BOOL IsInstalled();
  30. BOOL Install();
  31. BOOL Uninstall();
  32. LONG Unlock();
  33. void LogEvent(LPCTSTR pszFormat, ...);
  34. void SetServiceStatus(DWORD dwState);
  35. void SetupAsLocalServer();
  36. //Implementation
  37. private:
  38. static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
  39. static void WINAPI _Handler(DWORD dwOpcode);
  40. void PostLCDShutdownMessage();
  41. // data members
  42. public:
  43. TCHAR m_szServiceName[256];
  44. TCHAR m_szServiceShortName[256];
  45. SERVICE_STATUS_HANDLE m_hServiceStatus;
  46. SERVICE_STATUS m_status;
  47. DWORD dwThreadID;
  48. BOOL m_bService;
  49. HWND hwnd;
  50. };
  51. #endif // _MYSERVICE_H_