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.

61 lines
1.6 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. void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID, const GUID* plibid = NULL);
  29. void Start();
  30. void ServiceMain(DWORD dwArgc, LPWSTR* lpszArgv);
  31. void Handler(DWORD dwOpcode);
  32. void Run();
  33. LONG IncrementServiceCount();
  34. LONG DecrementServiceCount();
  35. void SetServiceStatus(DWORD dwState);
  36. //Implementation
  37. private:
  38. static void WINAPI _ServiceMain(DWORD dwArgc, LPWSTR* lpszArgv);
  39. static void WINAPI _Handler(DWORD dwOpcode);
  40. // data members
  41. public:
  42. SERVICE_STATUS_HANDLE m_hServiceStatus;
  43. SERVICE_STATUS m_status;
  44. DWORD dwThreadID;
  45. };
  46. extern CServiceModule _Module;
  47. #include <atlcom.h>
  48. #include <comdef.h>
  49. #endif // !defined(AFX_STDAFX_H__1BB94413_1005_4129_B577_B9A060FFDA25__INCLUDED)