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.

150 lines
2.8 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvFact.h
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_ProviderRegistrar_H
  9. #define _Server_ProviderRegistrar_H
  10. #include "Globals.h"
  11. class CInterceptor_DecoupledClient ;
  12. class CServerObject_ProviderRegistrar_Base : public IWbemDecoupledRegistrar
  13. {
  14. protected:
  15. WmiAllocator &m_Allocator ;
  16. CriticalSection m_CriticalSection ;
  17. GUID m_Identity ;
  18. BSTR m_Clsid ;
  19. BSTR m_User ;
  20. BSTR m_Locale ;
  21. BSTR m_Scope ;
  22. BSTR m_Registration ;
  23. BOOL m_Registered ;
  24. BYTE *m_MarshaledProxy ;
  25. DWORD m_MarshaledProxyLength ;
  26. CInterceptor_DecoupledClient *m_Provider ;
  27. HRESULT CreateInterceptor (
  28. IWbemContext *a_Context ,
  29. IUnknown *a_Unknown ,
  30. BYTE *&a_MarshaledProxy ,
  31. DWORD& a_MarshaledProxyLength ,
  32. IUnknown *&a_MarshaledUnknown
  33. ) ;
  34. HRESULT DirectUnRegister (
  35. long a_Flags ,
  36. IWbemContext *a_Context ,
  37. LPCWSTR a_User ,
  38. LPCWSTR a_Locale ,
  39. LPCWSTR a_Registration ,
  40. LPCWSTR a_Scope ,
  41. GUID &a_Identity
  42. ) ;
  43. HRESULT DirectRegister (
  44. GUID &a_Identity ,
  45. long a_Flags ,
  46. IWbemContext *a_Context ,
  47. LPCWSTR a_User ,
  48. LPCWSTR a_Locale ,
  49. LPCWSTR a_Registration ,
  50. LPCWSTR a_Scope ,
  51. IUnknown *a_Unknown ,
  52. BYTE *a_MarshaledProxy ,
  53. DWORD a_MarshaledProxyLength
  54. ) ;
  55. HRESULT SaveToRegistry (
  56. long a_Flags ,
  57. IWbemContext *a_Context ,
  58. LPCWSTR a_User ,
  59. LPCWSTR a_Locale ,
  60. LPCWSTR a_Registration ,
  61. LPCWSTR a_Scope ,
  62. IUnknown *a_Unknown ,
  63. BYTE *a_MarshaledProxy ,
  64. DWORD a_MarshaledProxyLength
  65. ) ;
  66. protected:
  67. public: /* Internal */
  68. public: /* External */
  69. CServerObject_ProviderRegistrar_Base ( WmiAllocator &a_Allocator ) ;
  70. ~CServerObject_ProviderRegistrar_Base () ;
  71. HRESULT STDMETHODCALLTYPE Register (
  72. long a_Flags ,
  73. IWbemContext *a_Context ,
  74. LPCWSTR a_User ,
  75. LPCWSTR a_Locale ,
  76. LPCWSTR a_Scope ,
  77. LPCWSTR a_Registration ,
  78. IUnknown *a_Unknown
  79. ) ;
  80. HRESULT STDMETHODCALLTYPE UnRegister () ;
  81. HRESULT Initialize () ;
  82. };
  83. /******************************************************************************
  84. *
  85. * Name:
  86. *
  87. *
  88. * Description:
  89. *
  90. *
  91. *****************************************************************************/
  92. class CServerObject_ProviderRegistrar : public CServerObject_ProviderRegistrar_Base
  93. {
  94. private:
  95. long m_ReferenceCount ;
  96. protected:
  97. public: /* Internal */
  98. public: /* External */
  99. CServerObject_ProviderRegistrar ( WmiAllocator &a_Allocator = *DecoupledProviderSubSystem_Globals::s_Allocator) ;
  100. ~CServerObject_ProviderRegistrar () ;
  101. //IUnknown members
  102. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  103. STDMETHODIMP_( ULONG ) AddRef () ;
  104. STDMETHODIMP_( ULONG ) Release () ;
  105. };
  106. #endif // _Server_ProviderRegistrar_H