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.

497 lines
17 KiB

  1. //***************************************************************************
  2. //
  3. // VPSERV.H
  4. //
  5. // Module: WBEM VIEW PROVIDER
  6. //
  7. // Purpose: Contains the WBEM services interfaces
  8. //
  9. // Copyright (c) 1998-2001 Microsoft Corporation, All Rights Reserved
  10. //
  11. //***************************************************************************
  12. #ifndef _VIEW_PROV_VPSERV_H
  13. #define _VIEW_PROV_VPSERV_H
  14. typedef
  15. enum tag_WBEMPROVSTATUS
  16. {
  17. WBEM_PROV_NO_ERROR = 0,
  18. WBEM_PROV_S_NO_ERROR = 0,
  19. WBEM_PROV_S_NO_MORE_DATA = 0x40001,
  20. WBEM_PROV_S_ALREADY_EXISTS = WBEM_PROV_S_NO_MORE_DATA + 1,
  21. WBEM_PROV_S_NOT_FOUND = WBEM_PROV_S_ALREADY_EXISTS + 1,
  22. WBEM_PROV_S_RESET_TO_DEFAULT = WBEM_PROV_S_NOT_FOUND + 1,
  23. WBEM_PROV_E_FAILED = 0x80041001,
  24. WBEM_PROV_E_NOT_FOUND = WBEM_PROV_E_FAILED + 1,
  25. WBEM_PROV_E_ACCESS_DENIED = WBEM_PROV_E_NOT_FOUND + 1,
  26. WBEM_PROV_E_PROVIDER_FAILURE = WBEM_PROV_E_ACCESS_DENIED + 1,
  27. WBEM_PROV_E_TYPE_MISMATCH = WBEM_PROV_E_PROVIDER_FAILURE + 1,
  28. WBEM_PROV_E_OUT_OF_MEMORY = WBEM_PROV_E_TYPE_MISMATCH + 1,
  29. WBEM_PROV_E_INVALID_CONTEXT = WBEM_PROV_E_OUT_OF_MEMORY + 1,
  30. WBEM_PROV_E_INVALID_PARAMETER = WBEM_PROV_E_INVALID_CONTEXT + 1,
  31. WBEM_PROV_E_NOT_AVAILABLE = WBEM_PROV_E_INVALID_PARAMETER + 1,
  32. WBEM_PROV_E_CRITICAL_ERROR = WBEM_PROV_E_NOT_AVAILABLE + 1,
  33. WBEM_PROV_E_INVALID_STREAM = WBEM_PROV_E_CRITICAL_ERROR + 1,
  34. WBEM_PROV_E_NOT_SUPPORTED = WBEM_PROV_E_INVALID_STREAM + 1,
  35. WBEM_PROV_E_INVALID_SUPERCLASS = WBEM_PROV_E_NOT_SUPPORTED + 1,
  36. WBEM_PROV_E_INVALID_NAMESPACE = WBEM_PROV_E_INVALID_SUPERCLASS + 1,
  37. WBEM_PROV_E_INVALID_OBJECT = WBEM_PROV_E_INVALID_NAMESPACE + 1,
  38. WBEM_PROV_E_INVALID_CLASS = WBEM_PROV_E_INVALID_OBJECT + 1,
  39. WBEM_PROV_E_PROVIDER_NOT_FOUND = WBEM_PROV_E_INVALID_CLASS + 1,
  40. WBEM_PROV_E_INVALID_PROVIDER_REGISTRATION = WBEM_PROV_E_PROVIDER_NOT_FOUND + 1,
  41. WBEM_PROV_E_PROVIDER_LOAD_FAILURE = WBEM_PROV_E_INVALID_PROVIDER_REGISTRATION + 1,
  42. WBEM_PROV_E_INITIALIZATION_FAILURE = WBEM_PROV_E_PROVIDER_LOAD_FAILURE + 1,
  43. WBEM_PROV_E_TRANSPORT_FAILURE = WBEM_PROV_E_INITIALIZATION_FAILURE + 1,
  44. WBEM_PROV_E_INVALID_OPERATION = WBEM_PROV_E_TRANSPORT_FAILURE + 1,
  45. WBEM_PROV_E_INVALID_QUERY = WBEM_PROV_E_INVALID_OPERATION + 1,
  46. WBEM_PROV_E_INVALID_QUERY_TYPE = WBEM_PROV_E_INVALID_QUERY + 1,
  47. WBEM_PROV_E_ALREADY_EXISTS = WBEM_PROV_E_INVALID_QUERY_TYPE + 1,
  48. WBEM_PROV_E_OVERRIDE_NOT_ALLOWED = WBEM_PROV_E_ALREADY_EXISTS + 1,
  49. WBEM_PROV_E_PROPAGATED_QUALIFIER = WBEM_PROV_E_OVERRIDE_NOT_ALLOWED + 1,
  50. WBEM_PROV_E_UNEXPECTED = WBEM_PROV_E_PROPAGATED_QUALIFIER + 1,
  51. WBEM_PROV_E_ILLEGAL_OPERATION = WBEM_PROV_E_UNEXPECTED + 1,
  52. WBEM_PROV_E_CANNOT_BE_KEY = WBEM_PROV_E_ILLEGAL_OPERATION + 1,
  53. WBEM_PROV_E_INCOMPLETE_CLASS = WBEM_PROV_E_CANNOT_BE_KEY + 1,
  54. WBEM_PROV_E_INVALID_SYNTAX = WBEM_PROV_E_INCOMPLETE_CLASS + 1,
  55. WBEM_PROV_E_NONDECORATED_OBJECT = WBEM_PROV_E_INVALID_SYNTAX + 1,
  56. WBEM_PROV_E_READ_ONLY = WBEM_PROV_E_NONDECORATED_OBJECT + 1,
  57. WBEM_PROV_E_PROVIDER_NOT_CAPABLE = WBEM_PROV_E_READ_ONLY + 1,
  58. WBEM_PROV_E_CLASS_HAS_CHILDREN = WBEM_PROV_E_PROVIDER_NOT_CAPABLE + 1,
  59. WBEM_PROV_E_CLASS_HAS_INSTANCES = WBEM_PROV_E_CLASS_HAS_CHILDREN + 1 ,
  60. // Added
  61. WBEM_PROV_E_INVALID_PROPERTY = WBEM_PROV_E_CLASS_HAS_INSTANCES + 1 ,
  62. WBEM_PROV_E_INVALID_QUALIFIER = WBEM_PROV_E_INVALID_PROPERTY + 1 ,
  63. WBEM_PROV_E_INVALID_PATH = WBEM_PROV_E_INVALID_QUALIFIER + 1 ,
  64. WBEM_PROV_E_INVALID_PATHKEYPARAMETER = WBEM_PROV_E_INVALID_PATH + 1 ,
  65. WBEM_PROV_E_MISSINGPATHKEYPARAMETER = WBEM_PROV_E_INVALID_PATHKEYPARAMETER + 1 ,
  66. WBEM_PROV_E_INVALID_KEYORDERING = WBEM_PROV_E_MISSINGPATHKEYPARAMETER + 1 ,
  67. WBEM_PROV_E_DUPLICATEPATHKEYPARAMETER = WBEM_PROV_E_INVALID_KEYORDERING + 1 ,
  68. WBEM_PROV_E_MISSINGKEY = WBEM_PROV_E_DUPLICATEPATHKEYPARAMETER + 1 ,
  69. WBEM_PROV_E_INVALID_TRANSPORT = WBEM_PROV_E_MISSINGKEY + 1 ,
  70. WBEM_PROV_E_INVALID_TRANSPORTCONTEXT = WBEM_PROV_E_INVALID_TRANSPORT + 1 ,
  71. WBEM_PROV_E_TRANSPORT_ERROR = WBEM_PROV_E_INVALID_TRANSPORTCONTEXT + 1 ,
  72. WBEM_PROV_E_TRANSPORT_NO_RESPONSE = WBEM_PROV_E_TRANSPORT_ERROR + 1 ,
  73. WBEM_PROV_E_NOWRITABLEPROPERTIES = WBEM_PROV_E_TRANSPORT_NO_RESPONSE + 1 ,
  74. WBEM_PROV_E_NOREADABLEPROPERTIES = WBEM_PROV_E_NOWRITABLEPROPERTIES + 1 ,
  75. WBEM_PROV_E_TOOMANYRESULTSRETURNED = WBEM_PROV_E_NOREADABLEPROPERTIES + 1
  76. } WBEMPROVSTATUS;
  77. wchar_t *UnicodeStringDuplicate ( const wchar_t *string ) ;
  78. wchar_t *UnicodeStringAppend ( const wchar_t *prefix , const wchar_t *suffix ) ;
  79. class CWbemProxyServerWrap
  80. {
  81. public:
  82. BOOL m_InUse;
  83. IWbemServices *m_Proxy;
  84. CWbemProxyServerWrap(IWbemServices *a_Proxy) : m_Proxy(NULL), m_InUse(FALSE) {m_Proxy = a_Proxy;}
  85. CWbemProxyServerWrap() : m_Proxy(NULL), m_InUse(FALSE) {}
  86. };
  87. template <> inline void AFXAPI DestructElements<CWbemProxyServerWrap> (CWbemProxyServerWrap* ptr_e, int x)
  88. {
  89. for (int i = 0; i < x; i++)
  90. {
  91. if (ptr_e[i].m_Proxy != NULL)
  92. {
  93. ptr_e[i].m_Proxy->Release();
  94. }
  95. }
  96. }
  97. class CWbemServerWrap
  98. {
  99. private:
  100. LONG m_ref;
  101. CList<CWbemProxyServerWrap, CWbemProxyServerWrap &> m_ProxyPool;
  102. IWbemServices *m_MainServ;
  103. wchar_t *m_Principal;
  104. BSTR m_Path;
  105. CCriticalSection m_Lock;
  106. public:
  107. CWbemServerWrap(IWbemServices *pServ, const wchar_t* prncpl, const wchar_t* path);
  108. ULONG AddRef();
  109. ULONG Release();
  110. BOOL IsRemote() { return m_Principal != NULL; }
  111. const wchar_t* GetPrincipal() { return m_Principal; }
  112. BSTR GetPath() { return m_Path; }
  113. IWbemServices* GetServerOrProxy();
  114. void ReturnServerOrProxy(IWbemServices *a_pServ);
  115. void SetMainServer(IWbemServices *a_pServ);
  116. BOOL ProxyBelongsTo(IWbemServices *a_proxy);
  117. ~CWbemServerWrap();
  118. };
  119. template <> inline void AFXAPI DestructElements<CWbemServerWrap*> (CWbemServerWrap** ptr_e, int x)
  120. {
  121. for (int i = 0; i < x; i++)
  122. {
  123. if (ptr_e[i] != NULL)
  124. {
  125. ptr_e[i]->Release();
  126. }
  127. }
  128. }
  129. template <> inline void AFXAPI DestructElements<IWbemServices*> (IWbemServices** ptr_e, int x)
  130. {
  131. for (int i = 0; i < x; i++)
  132. {
  133. if (ptr_e[i] != NULL)
  134. {
  135. ptr_e[i]->Release();
  136. }
  137. }
  138. }
  139. class CIWbemServMap : public CMap<CStringW, LPCWSTR, CWbemServerWrap*, CWbemServerWrap*>
  140. {
  141. private:
  142. CCriticalSection m_Lock;
  143. public:
  144. BOOL Lock() { return m_Lock.Lock(); }
  145. void EmptyMap();
  146. BOOL Unlock() { return m_Lock.Unlock(); }
  147. };
  148. class WbemProvErrorObject
  149. {
  150. private:
  151. wchar_t *m_provErrorMessage ;
  152. WBEMPROVSTATUS m_provErrorStatus ;
  153. WBEMSTATUS m_wbemErrorStatus ;
  154. protected:
  155. public:
  156. WbemProvErrorObject () : m_provErrorMessage ( NULL ) , m_wbemErrorStatus ( WBEM_NO_ERROR ) , m_provErrorStatus ( WBEM_PROV_NO_ERROR ) {} ;
  157. virtual ~WbemProvErrorObject () { delete [] m_provErrorMessage ; } ;
  158. void SetStatus ( WBEMPROVSTATUS a_provErrorStatus )
  159. {
  160. m_provErrorStatus = a_provErrorStatus ;
  161. } ;
  162. void SetWbemStatus ( WBEMSTATUS a_wbemErrorStatus )
  163. {
  164. m_wbemErrorStatus = a_wbemErrorStatus ;
  165. } ;
  166. void SetMessage ( wchar_t *a_provErrorMessage )
  167. {
  168. delete [] m_provErrorMessage ;
  169. m_provErrorMessage = UnicodeStringDuplicate ( a_provErrorMessage ) ;
  170. } ;
  171. wchar_t *GetMessage () { return m_provErrorMessage ; } ;
  172. WBEMPROVSTATUS GetStatus () { return m_provErrorStatus ; } ;
  173. WBEMSTATUS GetWbemStatus () { return m_wbemErrorStatus ; } ;
  174. } ;
  175. class CViewProvServ : public IWbemServices, public IWbemProviderInit
  176. {
  177. private:
  178. BOOL m_Initialised ;
  179. LONG m_ReferenceCount ; //Object reference count
  180. CCriticalSection m_criticalSection ;
  181. WbemNamespacePath m_NamespacePath ;
  182. wchar_t *m_Namespace ;
  183. IWbemServices *m_Server ;
  184. wchar_t *m_localeId ;
  185. BSTR m_UserName;
  186. BOOL m_GetNotifyCalled ;
  187. BOOL m_GetExtendedNotifyCalled ;
  188. IWbemClassObject *m_NotificationClassObject ;
  189. IWbemClassObject *m_ExtendedNotificationClassObject ;
  190. protected:
  191. public:
  192. static ProvDebugLog* sm_debugLog;
  193. static IUnsecuredApartment* sm_UnsecApp;
  194. CIWbemServMap sm_ServerMap;
  195. IWbemLocator* sm_Locator;
  196. CMap<CStringW, LPCWSTR, int, int> sm_OutStandingConnections;
  197. HANDLE sm_ConnectionMade;
  198. CViewProvServ () ;
  199. ~CViewProvServ () ;
  200. // Implementation
  201. HRESULT GetLocator(IWbemLocator** ppLoc);
  202. static HRESULT GetUnsecApp(IUnsecuredApartment** ppLoc);
  203. IWbemServices *GetServer () ;
  204. WbemNamespacePath *GetNamespacePath () { return & m_NamespacePath ; }
  205. wchar_t *GetNamespace () ;
  206. void SetNamespace ( wchar_t *a_Namespace ) ;
  207. #ifndef UNICODE
  208. BSTR GetUserName() {return m_UserName;}
  209. #endif
  210. void SetLocaleId ( wchar_t *a_localeId ) ;
  211. wchar_t *GetLocaleId () { return m_localeId ; }
  212. BOOL CreateExtendedNotificationObject (
  213. WbemProvErrorObject &a_errorObject,
  214. IWbemContext *pCtx
  215. ) ;
  216. BOOL CreateNotificationObject (
  217. WbemProvErrorObject &a_errorObject,
  218. IWbemContext *pCtx
  219. ) ;
  220. IWbemClassObject *GetNotificationObject (
  221. WbemProvErrorObject &a_errorObject,
  222. IWbemContext *pCtx
  223. ) ;
  224. IWbemClassObject *GetExtendedNotificationObject (
  225. WbemProvErrorObject &a_errorObject,
  226. IWbemContext *pCtx
  227. ) ;
  228. //Non-delegating object IUnknown
  229. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  230. STDMETHODIMP_( ULONG ) AddRef () ;
  231. STDMETHODIMP_( ULONG ) Release () ;
  232. /* IWbemServices methods */
  233. HRESULT STDMETHODCALLTYPE OpenNamespace(
  234. /* [in] */ const BSTR Namespace,
  235. /* [in] */ long lFlags,
  236. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  237. /* [unique][in][out] */ IWbemServices __RPC_FAR *__RPC_FAR *ppWorkingNamespace,
  238. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppResult) ;
  239. HRESULT STDMETHODCALLTYPE CancelAsyncCall(
  240. /* [in] */ IWbemObjectSink __RPC_FAR *pSink) ;
  241. HRESULT STDMETHODCALLTYPE QueryObjectSink(
  242. /* [in] */ long lFlags,
  243. /* [out] */ IWbemObjectSink __RPC_FAR *__RPC_FAR *ppResponseHandler) ;
  244. HRESULT STDMETHODCALLTYPE GetObject(
  245. /* [in] */ const BSTR ObjectPath,
  246. /* [in] */ long lFlags,
  247. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  248. /* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppObject,
  249. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) ;
  250. HRESULT STDMETHODCALLTYPE GetObjectAsync(
  251. /* [in] */ const BSTR ObjectPath,
  252. /* [in] */ long lFlags,
  253. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  254. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  255. HRESULT STDMETHODCALLTYPE PutClass(
  256. /* [in] */ IWbemClassObject __RPC_FAR *pObject,
  257. /* [in] */ long lFlags,
  258. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  259. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) ;
  260. HRESULT STDMETHODCALLTYPE PutClassAsync(
  261. /* [in] */ IWbemClassObject __RPC_FAR *pObject,
  262. /* [in] */ long lFlags,
  263. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  264. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  265. HRESULT STDMETHODCALLTYPE DeleteClass(
  266. /* [in] */ const BSTR Class,
  267. /* [in] */ long lFlags,
  268. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  269. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) ;
  270. HRESULT STDMETHODCALLTYPE DeleteClassAsync(
  271. /* [in] */ const BSTR Class,
  272. /* [in] */ long lFlags,
  273. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  274. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  275. HRESULT STDMETHODCALLTYPE CreateClassEnum(
  276. /* [in] */ const BSTR Superclass,
  277. /* [in] */ long lFlags,
  278. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  279. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum) ;
  280. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync(
  281. /* [in] */ const BSTR Superclass,
  282. /* [in] */ long lFlags,
  283. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  284. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  285. HRESULT STDMETHODCALLTYPE PutInstance(
  286. /* [in] */ IWbemClassObject __RPC_FAR *pInst,
  287. /* [in] */ long lFlags,
  288. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  289. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) ;
  290. HRESULT STDMETHODCALLTYPE PutInstanceAsync(
  291. /* [in] */ IWbemClassObject __RPC_FAR *pInst,
  292. /* [in] */ long lFlags,
  293. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  294. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  295. HRESULT STDMETHODCALLTYPE DeleteInstance(
  296. /* [in] */ const BSTR ObjectPath,
  297. /* [in] */ long lFlags,
  298. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  299. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) ;
  300. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync(
  301. /* [in] */ const BSTR ObjectPath,
  302. /* [in] */ long lFlags,
  303. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  304. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  305. HRESULT STDMETHODCALLTYPE CreateInstanceEnum(
  306. /* [in] */ const BSTR Class,
  307. /* [in] */ long lFlags,
  308. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  309. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum) ;
  310. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync(
  311. /* [in] */ const BSTR Class,
  312. /* [in] */ long lFlags,
  313. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  314. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  315. HRESULT STDMETHODCALLTYPE ExecQuery(
  316. /* [in] */ const BSTR QueryLanguage,
  317. /* [in] */ const BSTR Query,
  318. /* [in] */ long lFlags,
  319. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  320. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum) ;
  321. HRESULT STDMETHODCALLTYPE ExecQueryAsync(
  322. /* [in] */ const BSTR QueryLanguage,
  323. /* [in] */ const BSTR Query,
  324. /* [in] */ long lFlags,
  325. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  326. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  327. HRESULT STDMETHODCALLTYPE ExecNotificationQuery(
  328. /* [in] */ const BSTR QueryLanguage,
  329. /* [in] */ const BSTR Query,
  330. /* [in] */ long lFlags,
  331. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  332. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum) ;
  333. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync(
  334. /* [in] */ const BSTR QueryLanguage,
  335. /* [in] */ const BSTR Query,
  336. /* [in] */ long lFlags,
  337. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  338. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  339. HRESULT STDMETHODCALLTYPE ExecMethod(
  340. /* [in] */ const BSTR ObjectPath,
  341. /* [in] */ const BSTR MethodName,
  342. /* [in] */ long lFlags,
  343. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  344. /* [in] */ IWbemClassObject __RPC_FAR *pInParams,
  345. /* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppOutParams,
  346. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) ;
  347. HRESULT STDMETHODCALLTYPE ExecMethodAsync(
  348. /* [in] */ const BSTR ObjectPath,
  349. /* [in] */ const BSTR MethodName,
  350. /* [in] */ long lFlags,
  351. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  352. /* [in] */ IWbemClassObject __RPC_FAR *pInParams,
  353. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) ;
  354. /* IWbemProviderInit methods */
  355. HRESULT STDMETHODCALLTYPE Initialize (
  356. LPWSTR pszUser,
  357. LONG lFlags,
  358. LPWSTR pszNamespace,
  359. LPWSTR pszLocale,
  360. IWbemServices *pCIMOM, // For anybody
  361. IWbemContext *pCtx,
  362. IWbemProviderInitSink *pInitSink // For init signals
  363. );
  364. } ;
  365. #define DebugOut8(a) { \
  366. \
  367. if ( CViewProvServ::sm_debugLog && CViewProvServ::sm_debugLog->GetLogging() && (CViewProvServ::sm_debugLog->GetLevel() & 8) ) \
  368. { \
  369. {a ; } \
  370. } \
  371. }
  372. #define DebugOut4(a) { \
  373. \
  374. if ( CViewProvServ::sm_debugLog && CViewProvServ::sm_debugLog->GetLogging() && (CViewProvServ::sm_debugLog->GetLevel() & 4) ) \
  375. { \
  376. {a ; } \
  377. } \
  378. }
  379. #define DebugOut2(a) { \
  380. \
  381. if ( CViewProvServ::sm_debugLog && CViewProvServ::sm_debugLog->GetLogging() && (CViewProvServ::sm_debugLog->GetLevel() & 2) ) \
  382. { \
  383. {a ; } \
  384. } \
  385. }
  386. #define DebugOut1(a) { \
  387. \
  388. if ( CViewProvServ::sm_debugLog && CViewProvServ::sm_debugLog->GetLogging() && (CViewProvServ::sm_debugLog->GetLevel() & 1 ) ) \
  389. { \
  390. {a ; } \
  391. } \
  392. }
  393. #endif //_VIEW_PROV_VPSERV_H