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.

57 lines
1.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ServiceMgr.h
  7. //
  8. // Description:
  9. // Service Manager implementation.
  10. //
  11. // Maintained By:
  12. // Geoffrey Pease (GPease) 22-NOV-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. // CServiceManager
  17. class
  18. CServiceManager:
  19. public IServiceProvider
  20. {
  21. private:
  22. // IUnknown
  23. LONG m_cRef; // Reference counter
  24. // IServiceProvider
  25. DWORD m_dwObjectManagerCookie; // Cookie for Object Manager
  26. DWORD m_dwTaskManagerCookie; // Cookie for Task Manager
  27. DWORD m_dwNotificationManagerCookie; // Cookie for Notification Manager
  28. DWORD m_dwConnectionManagerCookie; // Cookie for Connection Manager
  29. DWORD m_dwLogManagerCookie; // Cookie for Log Manager
  30. IGlobalInterfaceTable * m_pgit; // Global Interface Table
  31. static CRITICAL_SECTION * sm_pcs; // Access control critical section
  32. static BOOL sm_fShutDown; // TRUE if process shutting down.
  33. private: // Methods
  34. CServiceManager( );
  35. ~CServiceManager();
  36. STDMETHOD(Init)( );
  37. public: // Methods
  38. static HRESULT
  39. S_HrCreateInstance( IUnknown ** ppunkOut );
  40. static HRESULT
  41. S_HrGetManagerPointer( IServiceProvider ** pspOut );
  42. // IUnknown
  43. STDMETHOD(QueryInterface)( REFIID riid, LPVOID *ppv );
  44. STDMETHOD_(ULONG, AddRef)(void);
  45. STDMETHOD_(ULONG, Release)(void);
  46. // IServiceProvider
  47. STDMETHOD(QueryService)( REFCLSID rclsidIn, REFIID riidIn, void ** ppvOut );
  48. }; // class CServiceManager