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.

71 lines
1.8 KiB

  1. //*************************************************************
  2. //
  3. // Copyright (c)1999 Microsoft Corporation, All Rights Reserved
  4. //
  5. // stdafx.h
  6. //
  7. // Module: Rsop Planning mode Provider
  8. //
  9. // History: 11-Jul-99 MickH Created
  10. //
  11. //*************************************************************
  12. #if !defined(AFX_STDAFX_H__1BB94413_1005_4129_B577_B9A060FFDA25__INCLUDED_)
  13. #define AFX_STDAFX_H__1BB94413_1005_4129_B577_B9A060FFDA25__INCLUDED_
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif // _MSC_VER > 1000
  17. #define STRICT
  18. #ifndef _WIN32_WINNT
  19. #define _WIN32_WINNT 0x0400
  20. #endif
  21. #define _ATL_APARTMENT_THREADED
  22. #include <atlbase.h>
  23. //You may derive a class from CComModule and use it if you want to override
  24. //something, but do not change the name of _Module
  25. class CServiceModule : public CComModule
  26. {
  27. public:
  28. HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);
  29. HRESULT UnregisterServer();
  30. void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID, const GUID* plibid = NULL);
  31. void Start();
  32. void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
  33. void Handler(DWORD dwOpcode);
  34. void Run();
  35. BOOL IsInstalled();
  36. BOOL Install();
  37. BOOL Uninstall();
  38. LONG Unlock();
  39. LONG Lock();
  40. void LogEvent(LPCTSTR pszFormat, ...);
  41. void SetServiceStatus(DWORD dwState);
  42. void SetupAsLocalServer();
  43. LONG IncrementServiceCount();
  44. LONG DecrementServiceCount();
  45. //Implementation
  46. private:
  47. static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
  48. static void WINAPI _Handler(DWORD dwOpcode);
  49. // data members
  50. public:
  51. TCHAR m_szServiceName[256];
  52. SERVICE_STATUS_HANDLE m_hServiceStatus;
  53. SERVICE_STATUS m_status;
  54. DWORD dwThreadID;
  55. BOOL m_bService;
  56. };
  57. extern CServiceModule _Module;
  58. #include <atlcom.h>
  59. #include <comdef.h>
  60. #endif // !defined(AFX_STDAFX_H__1BB94413_1005_4129_B577_B9A060FFDA25__INCLUDED)