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.

254 lines
5.5 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvFact.h
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_SimpleFactory_H
  9. #define _Server_SimpleFactory_H
  10. #include "ProvRegInfo.h"
  11. /******************************************************************************
  12. *
  13. * Name:
  14. *
  15. *
  16. * Description:
  17. *
  18. *
  19. *****************************************************************************/
  20. class CServerObject_RawFactory : public _IWmiProviderFactory ,
  21. public _IWmiProviderFactoryInitialize ,
  22. public IWbemShutdown
  23. {
  24. private:
  25. WmiAllocator &m_Allocator ;
  26. long m_ReferenceCount ;
  27. LONG m_Flags ;
  28. IWbemContext *m_Context ;
  29. LPWSTR m_Namespace ;
  30. IWbemPath *m_NamespacePath ;
  31. IWbemServices *m_Repository ;
  32. IWbemServices *m_Service ;
  33. public: /* Internal */
  34. CServerObject_RawFactory ( WmiAllocator & a_Allocator ) ;
  35. ~CServerObject_RawFactory () ;
  36. IWbemContext *Direct_GetContext () { return m_Context ; }
  37. LPCWSTR Direct_GetNamespace () { return m_Namespace ; }
  38. IWbemPath *Direct_GetNamespacePath () { return m_NamespacePath ; }
  39. IWbemServices *Direct_GetRepository () { return m_Repository ; }
  40. IWbemServices *Direct_GetService () { return m_Service ; }
  41. HRESULT CreateSyncProvider (
  42. IWbemServices *a_Stub ,
  43. IUnknown *a_ServerSideProvider ,
  44. wchar_t *a_NamespacePath ,
  45. LONG a_Flags ,
  46. IWbemContext *a_Context ,
  47. GUID *a_TransactionIdentifier ,
  48. LPCWSTR a_User ,
  49. LPCWSTR a_Locale ,
  50. LPCWSTR a_Scope ,
  51. REFIID a_RIID ,
  52. void **a_Interface ,
  53. CServerObject_ProviderRegistrationV1 &a_Registration
  54. ) ;
  55. HRESULT InitializeServerProvider (
  56. IWbemServices *a_Stub ,
  57. IUnknown *a_ProviderInterface ,
  58. wchar_t *a_NamespacePath ,
  59. LONG a_Flags ,
  60. IWbemContext *a_Context ,
  61. GUID *a_TransactionIdentifier ,
  62. LPCWSTR a_User ,
  63. LPCWSTR a_Locale ,
  64. LPCWSTR a_Scope ,
  65. REFIID a_RIID ,
  66. void **a_Interface ,
  67. CServerObject_ProviderRegistrationV1 &a_Registration
  68. ) ;
  69. HRESULT InitializeNonApartmentProvider (
  70. IWbemServices *a_Stub ,
  71. IUnknown *a_ServerSideProviderInterface ,
  72. wchar_t *a_NamespacePath ,
  73. LONG a_Flags ,
  74. IWbemContext *a_Context ,
  75. GUID *a_TransactionIdentifier ,
  76. LPCWSTR a_User ,
  77. LPCWSTR a_Locale ,
  78. LPCWSTR a_Scope ,
  79. REFIID a_RIID ,
  80. void **a_Interface ,
  81. CServerObject_ProviderRegistrationV1 &a_Registration
  82. ) ;
  83. HRESULT GetApartmentInstanceProvider (
  84. LONG a_Flags ,
  85. IWbemContext *a_Context ,
  86. GUID *a_TransactionIdentifier ,
  87. LPCWSTR a_User ,
  88. LPCWSTR a_Locale ,
  89. LPCWSTR a_Scope ,
  90. REFIID a_RIID ,
  91. void **a_Interface ,
  92. CServerObject_ProviderRegistrationV1 &a_Registration
  93. ) ;
  94. HRESULT GetNonApartmentProvider (
  95. LONG a_Flags ,
  96. IWbemContext *a_Context ,
  97. GUID *a_TransactionIdentifier ,
  98. LPCWSTR a_User ,
  99. LPCWSTR a_Locale ,
  100. LPCWSTR a_Scope ,
  101. REFIID a_RIID ,
  102. void **a_Interface ,
  103. CServerObject_ProviderRegistrationV1 &a_Registration
  104. ) ;
  105. HRESULT CheckInterfaceConformance (
  106. CServerObject_ProviderRegistrationV1 &a_Registration ,
  107. IUnknown *a_Unknown
  108. ) ;
  109. public: /* Internal */
  110. static HRESULT CreateInstance (
  111. CServerObject_ProviderRegistrationV1 &a_Registration ,
  112. const CLSID &a_ReferenceClsid ,
  113. LPUNKNOWN a_OuterUnknown ,
  114. const DWORD &a_ClassContext ,
  115. const UUID &a_ReferenceInterfaceId ,
  116. void **a_ObjectInterface
  117. ) ;
  118. static HRESULT CreateServerSide (
  119. CServerObject_ProviderRegistrationV1 &a_Registration ,
  120. GUID *a_TransactionIdentifier ,
  121. LPCWSTR a_User ,
  122. LPCWSTR a_Locale ,
  123. wchar_t *a_NamespacePath ,
  124. IUnknown **a_ProviderInterface
  125. ) ;
  126. public: /* External */
  127. //IUnknown members
  128. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  129. STDMETHODIMP_( ULONG ) AddRef () ;
  130. STDMETHODIMP_( ULONG ) Release () ;
  131. // CServerObject_RawFactory members
  132. HRESULT STDMETHODCALLTYPE GetHostedProvider (
  133. LONG a_Flags ,
  134. IWbemContext *a_Context ,
  135. GUID *a_TransactionIdentifier,
  136. LPCWSTR a_User ,
  137. LPCWSTR a_Locale ,
  138. LPCWSTR a_Scope ,
  139. LPCWSTR a_Name ,
  140. ULONG a_Host ,
  141. LPCWSTR a_HostGroup ,
  142. REFIID a_RIID ,
  143. void **a_Interface
  144. ) ;
  145. HRESULT STDMETHODCALLTYPE GetClassProvider (
  146. LONG a_Flags ,
  147. IWbemContext *a_Context ,
  148. LPCWSTR a_User ,
  149. LPCWSTR a_Locale ,
  150. LPCWSTR a_Scope ,
  151. IWbemClassObject *a_SuperClass ,
  152. REFIID a_RIID ,
  153. void **a_Interface
  154. );
  155. HRESULT STDMETHODCALLTYPE GetDynamicPropertyResolver (
  156. LONG a_Flags ,
  157. IWbemContext *a_Context ,
  158. LPCWSTR a_User ,
  159. LPCWSTR a_Locale ,
  160. REFIID a_RIID ,
  161. void **a_Interface
  162. ) ;
  163. HRESULT STDMETHODCALLTYPE GetProvider (
  164. WmiInternalContext a_InternalContext ,
  165. LONG a_Flags ,
  166. IWbemContext *a_Context ,
  167. GUID *a_TransactionIdentifier,
  168. LPCWSTR a_User ,
  169. LPCWSTR a_Locale ,
  170. LPCWSTR a_Scope ,
  171. LPCWSTR a_Name ,
  172. REFIID a_RIID ,
  173. void **a_Interface
  174. ) ;
  175. HRESULT STDMETHODCALLTYPE GetDecoupledProvider (
  176. LONG a_Flags ,
  177. IWbemContext *a_Context ,
  178. LPCWSTR a_User ,
  179. LPCWSTR a_Locale ,
  180. LPCWSTR a_Scope,
  181. LPCWSTR a_Name ,
  182. REFIID a_RIID ,
  183. void **a_Interface
  184. ) ;
  185. HRESULT STDMETHODCALLTYPE Initialize (
  186. _IWmiProvSS *a_SubSys ,
  187. _IWmiProviderFactory *a_Factory ,
  188. LONG a_Flags ,
  189. IWbemContext *a_Context ,
  190. LPCWSTR a_Namespace ,
  191. IWbemServices *a_Repository ,
  192. IWbemServices *a_Service
  193. ) ;
  194. HRESULT STDMETHODCALLTYPE Shutdown (
  195. LONG a_Flags ,
  196. ULONG a_MaxMilliSeconds ,
  197. IWbemContext *a_Context
  198. ) ;
  199. };
  200. #endif // _Server_SimpleFactory_H