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.

63 lines
2.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ServiceMgr.h
  7. //
  8. // Description:
  9. // Service Manager implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 05-JUN-2001
  13. // Geoffrey Pease (GPease) 22-NOV-1999
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. // CServiceManager
  18. class 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_cs; // Access control critical section
  32. private: // Methods
  33. CServiceManager( void );
  34. ~CServiceManager( void );
  35. HRESULT HrInit( void );
  36. // Private copy constructor to prevent copying.
  37. CServiceManager( const CServiceManager & nodeSrc );
  38. // Private assignment operator to prevent copying.
  39. const CServiceManager & operator = ( const CServiceManager & nodeSrc );
  40. public: // Methods
  41. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  42. static HRESULT S_HrGetManagerPointer( IServiceProvider ** pspOut );
  43. static HRESULT S_HrProcessInitialize( void );
  44. static HRESULT S_HrProcessUninitialize( void );
  45. // IUnknown
  46. STDMETHOD( QueryInterface )( REFIID riid, LPVOID *ppv );
  47. STDMETHOD_( ULONG, AddRef )(void);
  48. STDMETHOD_( ULONG, Release )(void);
  49. // IServiceProvider
  50. STDMETHOD( QueryService )( REFCLSID rclsidIn, REFIID riidIn, void ** ppvOut );
  51. }; // class CServiceManager