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.

1636 lines
40 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvRegInfo.h
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_ProviderRegistrationInfo_H
  9. #define _Server_ProviderRegistrationInfo_H
  10. #include "ProvDnf.h"
  11. /******************************************************************************
  12. *
  13. * Name:
  14. *
  15. *
  16. * Description:
  17. *
  18. *
  19. *****************************************************************************/
  20. HRESULT VerifySecureLocalSystemProviders ( wchar_t *a_Clsid ) ;
  21. HRESULT VerifySecureSvcHostProviders ( wchar_t *a_Clsid ) ;
  22. /******************************************************************************
  23. *
  24. * Name:
  25. *
  26. *
  27. * Description:
  28. *
  29. *
  30. *****************************************************************************/
  31. extern GENERIC_MAPPING g_ProviderBindingMapping ;
  32. /******************************************************************************
  33. *
  34. * Name:
  35. *
  36. *
  37. * Description:
  38. *
  39. *
  40. *****************************************************************************/
  41. #define DEFAULT_PROVIDER_TIMEOUT 120000
  42. #define DEFAULT_PROVIDER_LOAD_TIMEOUT 120000
  43. /******************************************************************************
  44. *
  45. * Name:
  46. *
  47. *
  48. * Description:
  49. *
  50. *
  51. *****************************************************************************/
  52. enum Enum_ThreadingModel
  53. {
  54. e_Apartment = 0 ,
  55. e_Both ,
  56. e_Free ,
  57. e_Neutral ,
  58. e_ThreadingModel_Unknown
  59. } ;
  60. /******************************************************************************
  61. *
  62. * Name:
  63. *
  64. *
  65. * Description:
  66. *
  67. *
  68. *****************************************************************************/
  69. enum Enum_Synchronization
  70. {
  71. e_Ignored = 0 ,
  72. e_None ,
  73. e_Supported ,
  74. e_Required ,
  75. e_RequiresNew ,
  76. e_Synchronization_Unknown
  77. } ;
  78. /******************************************************************************
  79. *
  80. * Name:
  81. *
  82. *
  83. * Description:
  84. *
  85. *
  86. *****************************************************************************/
  87. enum Enum_Boolean
  88. {
  89. e_False = 0 ,
  90. e_True ,
  91. e_Boolean_Unknown
  92. } ;
  93. /******************************************************************************
  94. *
  95. * Name:
  96. *
  97. *
  98. * Description:
  99. *
  100. *
  101. *****************************************************************************/
  102. enum Enum_ImpersonationLevel
  103. {
  104. e_Impersonate_None = 0 ,
  105. e_Impersonate ,
  106. e_ImpersonationLevel_Unknown
  107. } ;
  108. /******************************************************************************
  109. *
  110. * Name:
  111. *
  112. *
  113. * Description:
  114. *
  115. *
  116. *****************************************************************************/
  117. enum Enum_InitializationReentrancy
  118. {
  119. e_InitializationReentrancy_Clsid = 0 ,
  120. e_InitializationReentrancy_Namespace ,
  121. e_InitializationReentrancy_None ,
  122. e_InitializationReentrancy_Unknown
  123. } ;
  124. /******************************************************************************
  125. *
  126. * Name:
  127. *
  128. *
  129. * Description:
  130. *
  131. *
  132. *****************************************************************************/
  133. enum Enum_InteractionType
  134. {
  135. e_InteractionType_Pull = 0 ,
  136. e_InteractionType_Push ,
  137. e_InteractionType_PushVerify ,
  138. e_InteractionType_Unknown
  139. } ;
  140. /******************************************************************************
  141. *
  142. * Name:
  143. *
  144. *
  145. * Description:
  146. *
  147. *
  148. *****************************************************************************/
  149. /******************************************************************************
  150. *
  151. * Name:
  152. *
  153. *
  154. * Description:
  155. *
  156. *
  157. *****************************************************************************/
  158. #define e_QuerySupportLevels_UnarySelect ( 1 )
  159. #define e_QuerySupportLevels_References ( e_QuerySupportLevels_UnarySelect << 1 )
  160. #define e_QuerySupportLevels_Associators ( e_QuerySupportLevels_References << 1 )
  161. #define e_QuerySupportLevels_V1ProviderDefined ( e_QuerySupportLevels_Associators << 1 )
  162. #define e_QuerySupportLevels_None ( e_QuerySupportLevels_V1ProviderDefined << 1 )
  163. #define e_QuerySupportLevels_Unknown ( 0 )
  164. /******************************************************************************
  165. *
  166. * Name:
  167. *
  168. *
  169. * Description:
  170. *
  171. *
  172. *****************************************************************************/
  173. typedef ULONGLONG Enum_PropertyMask ;
  174. #define e_ThreadingModel 0x1
  175. #define e_Synchronization 0x2
  176. #define e_Clsid 0x4
  177. #define e_ClientClsid 0x8
  178. #define e_DefaultMachineName 0x10
  179. #define e_UnloadTimeout 0x20
  180. #define e_ImpersonationLevel 0x40
  181. #define e_InitializationReentrancy 0x80
  182. #define e_InitializeAsAdminFirst 0x100
  183. #define e_PerUserInitialization 0x200
  184. #define e_PerLocaleInitialization 0x400
  185. #define e_Pure 0x800
  186. #define e_Hosting 0x1000
  187. #define e_HostingGroup 0x2000
  188. #define e_SupportsPut 0x4000
  189. #define e_SupportsGet 0x8000
  190. #define e_SupportsDelete 0x10000
  191. #define e_SupportsEnumeration 0x20000
  192. #define e_QuerySupportLevels 0x40000
  193. #define e_InteractionType 0x80000
  194. #define e_ResultSetQueries 0x100000
  195. #define e_UnSupportedQueries 0x200000
  196. #define e_ReferencedSetQueries 0x400000
  197. #define e_ClearAfter 0x800000
  198. #define e_SupportsThrottling 0x1000000
  199. #define e_ConcurrentIndependantRequests 0x2000000
  200. #define e_SupportsSendStatus 0x4000000
  201. #define e_OperationTimeoutInterval 0x8000000
  202. #define e_InitializationTimeoutInterval 0x10000000
  203. #define e_SupportsQuotas 0x20000000
  204. #define e_Enabled 0x40000000
  205. #define e_SupportsShutdown 0x80000000
  206. #define e_SupportsBatching 0x100000000
  207. #define e_SupportsTransactions 0x200000000
  208. #define e_CacheRefreshInterval 0x400000000
  209. #define e_PerUserSchema 0x800000000
  210. #define e_ReSynchroniseOnNamespaceOpen 0x1000000000
  211. #define e_MemoryPerHost 0x2000000000
  212. #define e_MemoryAllHosts 0x4000000000
  213. #define e_ThreadsPerHost 0x8000000000
  214. #define e_HandlesPerHost 0x10000000000
  215. #define e_ProcessLimitAllHosts 0x20000000000
  216. #define e_Version 0x40000000000
  217. #define e_SecurityDescriptor 0x80000000000
  218. #define e_Name 0x100000000000
  219. #define e_All 0xFFFFFFFFFFFFFFFF
  220. /******************************************************************************
  221. *
  222. * Name:
  223. *
  224. *
  225. * Description:
  226. *
  227. *
  228. *****************************************************************************/
  229. class CServerObject_GlobalRegistration
  230. {
  231. private:
  232. LONG m_ReferenceCount ;
  233. protected:
  234. HRESULT m_Result ;
  235. LPWSTR m_Object_UnloadTimeout ;
  236. ULONG m_Object_UnloadTimeoutMilliSeconds ;
  237. LPWSTR m_Event_UnloadTimeout ;
  238. ULONG m_Event_UnloadTimeoutMilliSeconds ;
  239. IWbemContext *m_Context ;
  240. IWbemPath *m_Namespace ;
  241. IWbemServices *m_Repository ;
  242. protected:
  243. static LPCWSTR s_Strings_Wmi_ClearAfter ;
  244. static LPCWSTR s_Strings_Wmi___ObjectProviderCacheControl ;
  245. static LPCWSTR s_Strings_Wmi___EventProviderCacheControl ;
  246. static LPCWSTR s_Strings_Wmi_Class ;
  247. static LPCWSTR s_Strings_Wmi_s_Strings_Query_Object ;
  248. static LPCWSTR s_Strings_Wmi_s_Strings_Path_Object ;
  249. static LPCWSTR s_Strings_Wmi_s_Strings_Query_Event ;
  250. static LPCWSTR s_Strings_Wmi_s_Strings_Path_Event ;
  251. protected:
  252. public: /* Internal */
  253. CServerObject_GlobalRegistration () ;
  254. ~CServerObject_GlobalRegistration () ;
  255. ULONG AddRef () ;
  256. ULONG Release () ;
  257. HRESULT SetContext (
  258. IWbemContext *a_Context ,
  259. IWbemPath *a_Namespace ,
  260. IWbemServices *a_Repository
  261. ) ;
  262. HRESULT QueryProperties (
  263. Enum_PropertyMask a_Mask ,
  264. IWbemClassObject *a_Object ,
  265. LPWSTR &a_UnloadTimeout ,
  266. ULONG &a_UnloadTimeoutMilliSeconds
  267. ) ;
  268. HRESULT QueryRepository (
  269. Enum_PropertyMask a_Mask
  270. ) ;
  271. HRESULT Load (
  272. Enum_PropertyMask a_Mask
  273. ) ;
  274. wchar_t *GetUnloadTimeout () { return m_Object_UnloadTimeout ; }
  275. ULONG GetUnloadTimeoutMilliSeconds () { return m_Object_UnloadTimeoutMilliSeconds ; }
  276. wchar_t *GetObjectUnloadTimeout () { return m_Object_UnloadTimeout ; }
  277. ULONG GetObjectUnloadTimeoutMilliSeconds () { return m_Object_UnloadTimeoutMilliSeconds ; }
  278. wchar_t *GetEventUnloadTimeout () { return m_Event_UnloadTimeout ; }
  279. ULONG GetEventUnloadTimeoutMilliSeconds () { return m_Event_UnloadTimeoutMilliSeconds ; }
  280. HRESULT GetResult () { return m_Result ; }
  281. };
  282. /******************************************************************************
  283. *
  284. * Name:
  285. *
  286. *
  287. * Description:
  288. *
  289. *
  290. *****************************************************************************/
  291. class CServerObject_HostQuotaRegistration
  292. {
  293. private:
  294. LONG m_ReferenceCount ;
  295. protected:
  296. HRESULT m_Result ;
  297. SIZE_T m_MemoryPerHost ;
  298. SIZE_T m_MemoryAllHosts ;
  299. ULONG m_ThreadsPerHost ;
  300. ULONG m_HandlesPerHost ;
  301. ULONG m_ProcessLimitAllHosts ;
  302. IWbemContext *m_Context ;
  303. IWbemPath *m_Namespace ;
  304. IWbemServices *m_Repository ;
  305. protected:
  306. static LPCWSTR s_Strings_Wmi_HostQuotas_Query ;
  307. static LPCWSTR s_Strings_Wmi_HostQuotas_Path ;
  308. static LPCWSTR s_Strings_Wmi_MemoryPerHost ;
  309. static LPCWSTR s_Strings_Wmi_MemoryAllHosts ;
  310. static LPCWSTR s_Strings_Wmi_ThreadsPerHost ;
  311. static LPCWSTR s_Strings_Wmi_HandlesPerHost ;
  312. static LPCWSTR s_Strings_Wmi_ProcessLimitAllHosts ;
  313. protected:
  314. public: /* Internal */
  315. CServerObject_HostQuotaRegistration () ;
  316. ~CServerObject_HostQuotaRegistration () ;
  317. ULONG AddRef () ;
  318. ULONG Release () ;
  319. HRESULT SetContext (
  320. IWbemContext *a_Context ,
  321. IWbemPath *a_Namespace ,
  322. IWbemServices *a_Repository
  323. ) ;
  324. HRESULT QueryProperties (
  325. Enum_PropertyMask a_Mask ,
  326. IWbemClassObject *a_Object
  327. ) ;
  328. HRESULT QueryRepository (
  329. Enum_PropertyMask a_Mask
  330. ) ;
  331. HRESULT Load (
  332. Enum_PropertyMask a_Mask
  333. ) ;
  334. SIZE_T GetMemoryPerHost () { return m_MemoryPerHost ; }
  335. SIZE_T GetMemoryAllHosts () { return m_MemoryAllHosts ; }
  336. ULONG GetThreadsPerHost () { return m_ThreadsPerHost; }
  337. ULONG GetHandlesPerHost () { return m_HandlesPerHost; }
  338. ULONG GetProcessLimitAllHosts () { return m_ProcessLimitAllHosts ; }
  339. HRESULT GetResult () { return m_Result ; }
  340. };
  341. /******************************************************************************
  342. *
  343. * Name:
  344. *
  345. *
  346. * Description:
  347. *
  348. *
  349. *****************************************************************************/
  350. class CServerObject_ComRegistration
  351. {
  352. private:
  353. LONG m_ReferenceCount ;
  354. private:
  355. HRESULT Load_ThreadingModel ( HKEY a_Clsid ) ;
  356. HRESULT Load_Synchronization ( HKEY a_ClsidKey ) ;
  357. HRESULT Load_InProcServer32 ( LPCWSTR a_ClsidStringKey ) ;
  358. HRESULT Load_LocalServer32 ( LPCWSTR a_ClsidStringKey ) ;
  359. HRESULT Load_AppId ( HKEY a_Clsid_Key ) ;
  360. HRESULT Load_ServerTypes ( LPCWSTR a_ClsidString ) ;
  361. protected:
  362. HRESULT m_Result ;
  363. Enum_ThreadingModel m_ThreadingModel ;
  364. Enum_Synchronization m_Synchronization ;
  365. Enum_Boolean m_InProcServer32 ;
  366. Enum_Boolean m_LocalServer32 ;
  367. Enum_Boolean m_Service ;
  368. Enum_Boolean m_Loaded ;
  369. BSTR m_Clsid ;
  370. BSTR m_AppId ;
  371. BSTR m_ProviderName ;
  372. wchar_t m_InProcServer32_Path [ MAX_PATH ] ;
  373. wchar_t m_LocalServer32_Path [ MAX_PATH ] ;
  374. wchar_t m_Server_Name [ MAX_PATH ] ;
  375. protected:
  376. static LPCWSTR s_Strings_Reg_Null ;
  377. static LPCWSTR s_Strings_Reg_ThreadingModel ;
  378. static LPCWSTR s_Strings_Reg_InProcServer32 ;
  379. static LPCWSTR s_Strings_Reg_LocalServer32 ;
  380. static LPCWSTR s_Strings_Reg_Synchronization ;
  381. static LPCWSTR s_Strings_Reg_AppId ;
  382. static LPCWSTR s_Strings_Reg_Apartment_Apartment ;
  383. static LPCWSTR s_Strings_Reg_Apartment_Both ;
  384. static LPCWSTR s_Strings_Reg_Apartment_Free ;
  385. static LPCWSTR s_Strings_Reg_Apartment_Neutral ;
  386. static LPCWSTR s_Strings_Reg_Apartment_Required ;
  387. static LPCWSTR s_Strings_Reg_Synchronization_Ignored ;
  388. static LPCWSTR s_Strings_Reg_Synchronization_None ;
  389. static LPCWSTR s_Strings_Reg_Synchronization_Supported ;
  390. static LPCWSTR s_Strings_Reg_Synchronization_Required ;
  391. static LPCWSTR s_Strings_Reg_Synchronization_RequiresNew ;
  392. static LPCWSTR s_Strings_Reg_ClsidKeyStr ;
  393. public: /* Internal */
  394. CServerObject_ComRegistration () ;
  395. ~CServerObject_ComRegistration () ;
  396. ULONG AddRef () ;
  397. ULONG Release () ;
  398. HRESULT Load ( LPCWSTR a_Clsid , LPCWSTR a_ProviderName ) ;
  399. Enum_ThreadingModel GetThreadingModel () { return m_ThreadingModel ; }
  400. Enum_Synchronization GetSynchronization () { return m_Synchronization ; }
  401. Enum_Boolean InProcServer32 () { return m_InProcServer32 ; }
  402. Enum_Boolean LocalServer32 () { return m_LocalServer32 ; }
  403. Enum_Boolean Loaded () { return m_Loaded ; }
  404. wchar_t *GetInProcServer32_Path () { return m_InProcServer32_Path ; }
  405. wchar_t *GetLocalServer32_Path () { return m_LocalServer32_Path ; }
  406. wchar_t *GetServer_Name () { return m_Server_Name ; }
  407. wchar_t *GetProviderName () { return m_ProviderName ; }
  408. wchar_t *GetProviderClsid () { return m_Clsid ; }
  409. HRESULT GetResult () { return m_Result ; }
  410. };
  411. /******************************************************************************
  412. *
  413. * Name:
  414. *
  415. *
  416. * Description:
  417. *
  418. *
  419. *****************************************************************************/
  420. class CServerObject_ComProviderRegistrationV1
  421. {
  422. private:
  423. LONG m_ReferenceCount ;
  424. protected:
  425. HRESULT m_Result ;
  426. CServerObject_ComRegistration m_ClsidServer ;
  427. ULONG m_Version ;
  428. Enum_ImpersonationLevel m_ImpersonationLevel ;
  429. Enum_InitializationReentrancy m_InitializationReentrancy ;
  430. BOOL m_InitializeAsAdminFirst ;
  431. BOOL m_PerUserInitialization ;
  432. BOOL m_PerLocaleInitialization ;
  433. BOOL m_SupportsQuotas ;
  434. BOOL m_Enabled ;
  435. BOOL m_SupportsShutdown ;
  436. BOOL m_Pure ;
  437. Enum_Hosting m_Hosting ;
  438. LPWSTR m_HostingGroup ;
  439. LPWSTR m_DefaultMachineName ;
  440. BOOL m_DecoupledImpersonationRestriction ;
  441. LPWSTR m_InitializationTimeout ;
  442. ULONG m_InitializationTimeoutMilliSeconds ;
  443. LPWSTR m_UnloadTimeout ;
  444. ULONG m_UnloadTimeoutMilliSeconds ;
  445. BOOL m_SupportsSendStatus ;
  446. LPWSTR m_OperationTimeout ;
  447. ULONG m_OperationTimeoutMilliSeconds ;
  448. BOOL m_SupportsThrottling ;
  449. ULONG m_ConcurrentIndependantRequests ;
  450. BSTR m_ProviderName ;
  451. GUID m_CLSID ;
  452. GUID m_ClientCLSID ;
  453. IWbemClassObject *m_Identity ;
  454. IWbemContext *m_Context ;
  455. IWbemPath *m_Namespace ;
  456. IWbemServices *m_Repository ;
  457. SECURITY_DESCRIPTOR *m_SecurityDescriptor ;
  458. public:
  459. static LPCWSTR s_Strings_Wmi_Clsid ;
  460. static LPCWSTR s_Strings_Wmi_ClientClsid ;
  461. static LPCWSTR s_Strings_Wmi_Name ;
  462. static LPCWSTR s_Strings_Wmi_Version ;
  463. static LPCWSTR s_Strings_Wmi_DefaultMachineName ;
  464. static LPCWSTR s_Strings_Wmi_UnloadTimeout ;
  465. static LPCWSTR s_Strings_Wmi_ImpersonationLevel ;
  466. static LPCWSTR s_Strings_Wmi_InitializationReentrancy ;
  467. static LPCWSTR s_Strings_Wmi_InitializeAsAdminFirst ;
  468. static LPCWSTR s_Strings_Wmi_PerUserInitialization ;
  469. static LPCWSTR s_Strings_Wmi_PerLocaleInitialization ;
  470. static LPCWSTR s_Strings_Wmi_Pure ;
  471. static LPCWSTR s_Strings_Wmi_Hosting ;
  472. static LPCWSTR s_Strings_Wmi_HostingGroup ;
  473. static LPCWSTR s_Strings_Wmi_SupportsThrottling ;
  474. static LPCWSTR s_Strings_Wmi_SupportsQuotas ;
  475. static LPCWSTR s_Strings_Wmi_SupportsShutdown ;
  476. static LPCWSTR s_Strings_Wmi_Enabled ;
  477. static LPCWSTR s_Strings_Wmi_ConcurrentIndependantRequests ;
  478. static LPCWSTR s_Strings_Wmi_SupportsSendStatus ;
  479. static LPCWSTR s_Strings_Wmi_OperationTimeoutInterval ;
  480. static LPCWSTR s_Strings_Wmi_InitializationTimeoutInterval ;
  481. static LPCWSTR s_Strings_Wmi_SecurityDescriptor ;
  482. static WCHAR s_Strings_Wmi_WmiCore [] ;
  483. static WCHAR s_Strings_Wmi_SelfHost [] ;
  484. static WCHAR s_Strings_Wmi_WmiCoreOrSelfHost [] ;
  485. static WCHAR s_Strings_Wmi_Decoupled [] ;
  486. static WCHAR s_Strings_Wmi_DecoupledColon [] ;
  487. static WCHAR s_Strings_Wmi_SharedLocalSystemHost [] ;
  488. static WCHAR s_Strings_Wmi_SharedLocalSystemHostOrSelfHost [] ;
  489. static WCHAR s_Strings_Wmi_SharedLocalServiceHost [] ;
  490. static WCHAR s_Strings_Wmi_SharedNetworkServiceHost [] ;
  491. static WCHAR s_Strings_Wmi_SharedUserHost [] ;
  492. static WCHAR s_Strings_Wmi_NonCom [] ;
  493. static WCHAR s_Strings_Wmi_DefaultSharedLocalSystemHost [] ;
  494. static WCHAR s_Strings_Wmi_DefaultSharedLocalSystemHostOrSelfHost [] ;
  495. static WCHAR s_Strings_Wmi_DefaultSharedLocalServiceHost [] ;
  496. static WCHAR s_Strings_Wmi_DefaultSharedNetworkServiceHost [] ;
  497. static WCHAR s_Strings_Wmi_DefaultSharedUserHost [] ;
  498. static LPCWSTR s_Strings_Wmi_DefaultHostingRegistryKey ;
  499. protected:
  500. public: /* Internal */
  501. CServerObject_ComProviderRegistrationV1 () ;
  502. ~CServerObject_ComProviderRegistrationV1 () ;
  503. ULONG AddRef () ;
  504. ULONG Release () ;
  505. HRESULT SetContext (
  506. IWbemContext *a_Context ,
  507. IWbemPath *a_Namespace ,
  508. IWbemServices *a_Repository
  509. ) ;
  510. HRESULT QueryProperties (
  511. Enum_PropertyMask a_Mask ,
  512. IWbemClassObject *a_Object ,
  513. LPCWSTR a_ProviderName
  514. ) ;
  515. HRESULT QueryRepository (
  516. Enum_PropertyMask a_Mask ,
  517. IWbemPath *a_Scope,
  518. LPCWSTR a_ProviderName
  519. ) ;
  520. HRESULT QueryRepository (
  521. Enum_PropertyMask a_Mask ,
  522. IWbemPath *a_Scope,
  523. IWbemPath *a_Provider
  524. ) ;
  525. HRESULT Load (
  526. Enum_PropertyMask a_Mask ,
  527. IWbemPath *a_Scope,
  528. IWbemClassObject *a_Class
  529. ) ;
  530. HRESULT Load (
  531. Enum_PropertyMask a_Mask ,
  532. IWbemPath *a_Scope,
  533. LPCWSTR a_Provider
  534. ) ;
  535. HRESULT Load (
  536. Enum_PropertyMask a_Mask ,
  537. IWbemPath *a_Scope,
  538. IWbemPath *a_Provider
  539. ) ;
  540. const CLSID &GetClsid () { return m_CLSID ; }
  541. const CLSID &GetClientClsid () { return m_ClientCLSID ; }
  542. wchar_t *GetProviderName () { return m_ProviderName ; }
  543. ULONG GetVersion () { return m_Version ; }
  544. Enum_ImpersonationLevel GetImpersonationLevel () { return m_ImpersonationLevel ; }
  545. Enum_InitializationReentrancy GetInitializationReentrancy () { return m_InitializationReentrancy ; }
  546. Enum_Hosting GetHosting () { return m_Hosting ; }
  547. LPCWSTR GetHostingGroup () { return m_HostingGroup ; }
  548. BOOL InitializeAsAdminFirst () { return m_InitializeAsAdminFirst ; }
  549. BOOL PerUserInitialization () { return m_PerUserInitialization ; }
  550. BOOL PerLocaleInitialization () { return m_PerLocaleInitialization ; }
  551. BOOL Pure () { return m_Pure ; }
  552. BOOL Enabled () { return m_Enabled ; }
  553. BOOL SupportsQuotas () { return m_SupportsQuotas ; }
  554. wchar_t *GetDefaultMachineName () { return m_DefaultMachineName ; }
  555. wchar_t *GetUnloadTimeout () { return m_UnloadTimeout ; }
  556. wchar_t *GetInitializationTimeout () { return m_InitializationTimeout ; }
  557. wchar_t *GetOperationTimeout () { return m_OperationTimeout ; }
  558. void SetUnloadTimeoutMilliSeconds ( ULONG a_UnloadTimeoutMilliSeconds ) { m_UnloadTimeoutMilliSeconds = a_UnloadTimeoutMilliSeconds ; }
  559. ULONG GetUnloadTimeoutMilliSeconds () { return m_UnloadTimeoutMilliSeconds ; }
  560. ULONG GetInitializationTimeoutMilliSeconds () { return m_InitializationTimeoutMilliSeconds ; }
  561. ULONG GetOperationTimeoutMilliSeconds () { return m_OperationTimeoutMilliSeconds ; }
  562. ULONG GetConcurrentIndependantRequests () { return m_ConcurrentIndependantRequests ; }
  563. BOOL GetSupportsThrottling () { return m_SupportsThrottling ; }
  564. BOOL GetSupportsSendStatus () { return m_SupportsSendStatus ; }
  565. BOOL GetSupportsShutdown () { return m_SupportsShutdown ; }
  566. Enum_ThreadingModel GetThreadingModel () { return m_ClsidServer.GetThreadingModel () ; }
  567. BOOL GetDecoupledImpersonationRestriction () { return m_DecoupledImpersonationRestriction ; }
  568. CServerObject_ComRegistration &GetClsidServer () { return m_ClsidServer ; }
  569. SECURITY_DESCRIPTOR *GetSecurityDescriptor () { return m_SecurityDescriptor ; }
  570. HRESULT GetResult () { return m_Result ; }
  571. IWbemClassObject *GetIdentity () { return m_Identity ; }
  572. static HRESULT GetHosting (
  573. LPCWSTR a_Hosting ,
  574. Enum_Hosting & a_HostingValue ,
  575. LPWSTR &a_HostingGroup ,
  576. BOOL & a_ImpersonationRestriction
  577. ) ;
  578. static HRESULT GetHostingGroup (
  579. LPCWSTR a_Hosting ,
  580. size_t a_Prefix ,
  581. Enum_Hosting a_ExpectedHostingValue ,
  582. Enum_Hosting & a_HostingValue ,
  583. BSTR & a_HostingGroup
  584. ) ;
  585. static HRESULT GetDefaultHostingGroup (
  586. Enum_Hosting a_HostingValue ,
  587. BSTR & a_HostingGroup
  588. ) ;
  589. static HRESULT GetDecoupledImpersonationRestriction (
  590. LPCWSTR a_Hosting ,
  591. BOOL & a_ImpersonationRestriction
  592. ) ;
  593. } ;
  594. /******************************************************************************
  595. *
  596. * Name:
  597. *
  598. *
  599. * Description:
  600. *
  601. *
  602. *****************************************************************************/
  603. class CServerObject_InstanceProviderRegistrationV1
  604. {
  605. private:
  606. LONG m_ReferenceCount ;
  607. protected:
  608. HRESULT m_Result ;
  609. BOOL m_Supported ;
  610. BOOL m_SupportsPut ;
  611. BOOL m_SupportsGet ;
  612. BOOL m_SupportsDelete ;
  613. BOOL m_SupportsEnumeration ;
  614. BOOL m_SupportsBatching ;
  615. BOOL m_SupportsTransactions ;
  616. Enum_InteractionType m_InteractionType ;
  617. ULONG m_QuerySupportLevels ;
  618. IWbemContext *m_Context ;
  619. IWbemPath *m_Namespace ;
  620. IWbemServices *m_Repository ;
  621. private:
  622. static LPCWSTR s_Strings_Class ;
  623. static LPCWSTR s_Strings_InstanceProviderRegistration ;
  624. static LPCWSTR s_Strings_SupportsPut ;
  625. static LPCWSTR s_Strings_SupportsGet ;
  626. static LPCWSTR s_Strings_SupportsDelete ;
  627. static LPCWSTR s_Strings_SupportsEnumeration ;
  628. static LPCWSTR s_Strings_QuerySupportLevels ;
  629. static LPCWSTR s_Strings_InteractionType ;
  630. static LPCWSTR s_Strings_SupportsBatching ;
  631. static LPCWSTR s_Strings_SupportsTransactions ;
  632. static LPCWSTR s_Strings_QuerySupportLevels_UnarySelect ;
  633. static LPCWSTR s_Strings_QuerySupportLevels_References ;
  634. static LPCWSTR s_Strings_QuerySupportLevels_Associators ;
  635. static LPCWSTR s_Strings_QuerySupportLevels_V1ProviderDefined ;
  636. static LPCWSTR s_Strings_InteractionType_Pull ;
  637. static LPCWSTR s_Strings_InteractionType_Push ;
  638. static LPCWSTR s_Strings_InteractionType_PushVerify ;
  639. protected:
  640. HRESULT QueryRepositoryUsingQuery (
  641. Enum_PropertyMask a_Mask ,
  642. IWbemPath *a_Scope,
  643. BSTR a_Query
  644. ) ;
  645. public: /* Internal */
  646. CServerObject_InstanceProviderRegistrationV1 () ;
  647. ~CServerObject_InstanceProviderRegistrationV1 () ;
  648. ULONG AddRef () ;
  649. ULONG Release () ;
  650. HRESULT SetContext (
  651. IWbemContext *a_Context ,
  652. IWbemPath *a_Namespace ,
  653. IWbemServices *a_Repository
  654. ) ;
  655. HRESULT QueryProperties (
  656. Enum_PropertyMask a_Mask ,
  657. IWbemClassObject *a_Object
  658. ) ;
  659. HRESULT QueryRepository (
  660. Enum_PropertyMask a_Mask ,
  661. IWbemPath *a_Scope,
  662. LPCWSTR a_ProviderName
  663. ) ;
  664. HRESULT QueryRepository (
  665. Enum_PropertyMask a_Mask ,
  666. IWbemPath *a_Scope,
  667. IWbemPath *a_Provider
  668. ) ;
  669. HRESULT Load (
  670. Enum_PropertyMask a_Mask ,
  671. IWbemPath *a_Scope,
  672. IWbemClassObject *a_Class
  673. ) ;
  674. HRESULT Load (
  675. Enum_PropertyMask a_Mask ,
  676. IWbemPath *a_Scope,
  677. LPCWSTR a_Provider
  678. ) ;
  679. HRESULT Load (
  680. Enum_PropertyMask a_Mask ,
  681. IWbemPath *a_Scope,
  682. IWbemPath *a_Provider
  683. ) ;
  684. BOOL SupportsPut () { return m_SupportsPut ; }
  685. BOOL SupportsGet () { return m_SupportsGet ; }
  686. BOOL SupportsDelete () { return m_SupportsDelete ; }
  687. BOOL SupportsEnumeration () { return m_SupportsEnumeration ; }
  688. BOOL SupportsTransactions () { return m_SupportsTransactions ; }
  689. BOOL SupportsBatching () { return m_SupportsBatching ; }
  690. ULONG QuerySupportLevels () { return m_QuerySupportLevels ; }
  691. Enum_InteractionType InteractionType () { return m_InteractionType ; }
  692. BOOL Supported () { return m_Supported ; }
  693. HRESULT GetResult () { return m_Result ; }
  694. };
  695. /******************************************************************************
  696. *
  697. * Name:
  698. *
  699. *
  700. * Description:
  701. *
  702. *
  703. *****************************************************************************/
  704. class CServerObject_ClassProviderRegistrationV1
  705. {
  706. private:
  707. LONG m_ReferenceCount ;
  708. protected:
  709. HRESULT m_Result ;
  710. BOOL m_Supported ;
  711. BOOL m_SupportsPut ;
  712. BOOL m_SupportsGet ;
  713. BOOL m_SupportsDelete ;
  714. BOOL m_SupportsEnumeration ;
  715. BOOL m_SupportsBatching ;
  716. BOOL m_SupportsTransactions ;
  717. BOOL m_PerUserSchema ;
  718. BOOL m_ReSynchroniseOnNamespaceOpen ;
  719. BOOL m_HasReferencedSet;
  720. Enum_InteractionType m_InteractionType ;
  721. ULONG m_QuerySupportLevels ;
  722. ULONG m_Version ;
  723. LPWSTR m_CacheRefreshInterval ;
  724. ULONG m_CacheRefreshIntervalMilliSeconds ;
  725. LPWSTR m_ProviderName ;
  726. IWbemContext *m_Context ;
  727. IWbemPath *m_Namespace ;
  728. IWbemServices *m_Repository ;
  729. ULONG m_ResultSetQueryTreeCount ;
  730. WmiTreeNode **m_ResultSetQueryTree ;
  731. ULONG m_UnSupportedQueryTreeCount ;
  732. WmiTreeNode **m_UnSupportedQueryTree ;
  733. ULONG m_ReferencedSetQueryTreeCount ;
  734. WmiTreeNode **m_ReferencedSetQueryTree ;
  735. private:
  736. static LPCWSTR s_Strings_Class ;
  737. static LPCWSTR s_Strings_ClassProviderRegistration ;
  738. static LPCWSTR s_Strings_Version ;
  739. static LPCWSTR s_Strings_SupportsPut ;
  740. static LPCWSTR s_Strings_SupportsGet ;
  741. static LPCWSTR s_Strings_SupportsDelete ;
  742. static LPCWSTR s_Strings_SupportsEnumeration ;
  743. static LPCWSTR s_Strings_QuerySupportLevels ;
  744. static LPCWSTR s_Strings_InteractionType ;
  745. static LPCWSTR s_Strings_SupportsBatching ;
  746. static LPCWSTR s_Strings_SupportsTransactions ;
  747. static LPCWSTR s_Strings_CacheRefreshInterval ;
  748. static LPCWSTR s_Strings_PerUserSchema ;
  749. static LPCWSTR s_Strings_ReSynchroniseOnNamespaceOpen ;
  750. static LPCWSTR s_Strings_QuerySupportLevels_UnarySelect ;
  751. static LPCWSTR s_Strings_QuerySupportLevels_References ;
  752. static LPCWSTR s_Strings_QuerySupportLevels_Associators ;
  753. static LPCWSTR s_Strings_QuerySupportLevels_V1ProviderDefined ;
  754. static LPCWSTR s_Strings_InteractionType_Pull ;
  755. static LPCWSTR s_Strings_InteractionType_Push ;
  756. static LPCWSTR s_Strings_InteractionType_PushVerify ;
  757. static LPCWSTR s_Strings_ResultSetQueries ;
  758. static LPCWSTR s_Strings_UnSupportedQueries ;
  759. static LPCWSTR s_Strings_ReferencedSetQueries ;
  760. private:
  761. HRESULT ParseQuery (
  762. ULONG &a_Count ,
  763. WmiTreeNode **&a_Root ,
  764. SAFEARRAY *a_Array
  765. ) ;
  766. protected:
  767. HRESULT QueryRepositoryUsingQuery (
  768. Enum_PropertyMask a_Mask ,
  769. IWbemPath *a_Scope,
  770. BSTR a_Query
  771. ) ;
  772. public: /* Internal */
  773. CServerObject_ClassProviderRegistrationV1 () ;
  774. ~CServerObject_ClassProviderRegistrationV1 () ;
  775. ULONG AddRef () ;
  776. ULONG Release () ;
  777. HRESULT SetContext (
  778. IWbemContext *a_Context ,
  779. IWbemPath *a_Namespace ,
  780. IWbemServices *a_Repository
  781. ) ;
  782. HRESULT QueryProperties (
  783. Enum_PropertyMask a_Mask ,
  784. IWbemClassObject *a_Object
  785. ) ;
  786. HRESULT QueryRepository (
  787. Enum_PropertyMask a_Mask ,
  788. IWbemPath *a_Scope,
  789. LPCWSTR a_ProviderName
  790. ) ;
  791. HRESULT QueryRepository (
  792. Enum_PropertyMask a_Mask ,
  793. IWbemPath *a_Scope,
  794. IWbemPath *a_Provider
  795. ) ;
  796. HRESULT Load (
  797. Enum_PropertyMask a_Mask ,
  798. IWbemPath *a_Scope,
  799. IWbemClassObject *a_Class
  800. ) ;
  801. HRESULT Load (
  802. Enum_PropertyMask a_Mask ,
  803. IWbemPath *a_Scope,
  804. LPCWSTR a_Provider
  805. ) ;
  806. HRESULT Load (
  807. Enum_PropertyMask a_Mask ,
  808. IWbemPath *a_Scope,
  809. IWbemPath *a_Provider
  810. ) ;
  811. BOOL SupportsPut () { return m_SupportsPut ; }
  812. BOOL SupportsGet () { return m_SupportsGet ; }
  813. BOOL SupportsDelete () { return m_SupportsDelete ; }
  814. BOOL SupportsEnumeration () { return m_SupportsEnumeration ; }
  815. BOOL SupportsTransactions () { return m_SupportsTransactions ; }
  816. BOOL SupportsBatching () { return m_SupportsBatching ; }
  817. BOOL GetPerUserSchema () { return m_PerUserSchema ; }
  818. BOOL GetReSynchroniseOnNamespaceOpen () { return m_ReSynchroniseOnNamespaceOpen ; }
  819. BOOL HasReferencedSet () { return m_HasReferencedSet ; }
  820. ULONG QuerySupportLevels () { return m_QuerySupportLevels ; }
  821. Enum_InteractionType InteractionType () { return m_InteractionType ; }
  822. ULONG GetResultSetQueryCount () { return m_ResultSetQueryTreeCount ; }
  823. WmiTreeNode **GetResultSetQuery () { return m_ResultSetQueryTree ; }
  824. ULONG GetUnSupportedQueryCount () { return m_UnSupportedQueryTreeCount ; }
  825. WmiTreeNode **GetUnSupportedQuery () { return m_UnSupportedQueryTree ; }
  826. ULONG GetReferencedSetQueryCount () { return m_ReferencedSetQueryTreeCount ; }
  827. WmiTreeNode **GetReferencedSetQuery () { return m_ReferencedSetQueryTree ; }
  828. wchar_t *GetCacheRefreshInterval () { return m_CacheRefreshInterval ; }
  829. ULONG GetCacheRefreshIntervalMilliSeconds () { return m_CacheRefreshIntervalMilliSeconds ; }
  830. wchar_t *GetProviderName () { return m_ProviderName ; }
  831. BOOL Supported () { return m_Supported ; }
  832. HRESULT GetResult () { return m_Result ; }
  833. BOOL GetVersion () { return m_Version ; }
  834. };
  835. /******************************************************************************
  836. *
  837. * Name:
  838. *
  839. *
  840. * Description:
  841. *
  842. *
  843. *****************************************************************************/
  844. class CServerObject_MethodProviderRegistrationV1
  845. {
  846. private:
  847. LONG m_ReferenceCount ;
  848. protected:
  849. HRESULT m_Result ;
  850. BOOL m_Supported ;
  851. BOOL m_SupportsMethods ;
  852. IWbemContext *m_Context ;
  853. IWbemPath *m_Namespace ;
  854. IWbemServices *m_Repository ;
  855. private:
  856. static LPCWSTR s_Strings_Class ;
  857. static LPCWSTR s_Strings_MethodProviderRegistration ;
  858. protected:
  859. HRESULT QueryRepositoryUsingQuery (
  860. Enum_PropertyMask a_Mask ,
  861. IWbemPath *a_Scope,
  862. BSTR a_Query
  863. ) ;
  864. public: /* Internal */
  865. CServerObject_MethodProviderRegistrationV1 () ;
  866. ~CServerObject_MethodProviderRegistrationV1 () ;
  867. ULONG AddRef () ;
  868. ULONG Release () ;
  869. HRESULT SetContext (
  870. IWbemContext *a_Context ,
  871. IWbemPath *a_Namespace ,
  872. IWbemServices *a_Repository
  873. ) ;
  874. HRESULT QueryProperties (
  875. Enum_PropertyMask a_Mask ,
  876. IWbemClassObject *a_Object
  877. ) ;
  878. HRESULT QueryRepository (
  879. Enum_PropertyMask a_Mask ,
  880. IWbemPath *a_Scope,
  881. LPCWSTR a_ProviderName
  882. ) ;
  883. HRESULT QueryRepository (
  884. Enum_PropertyMask a_Mask ,
  885. IWbemPath *a_Scope,
  886. IWbemPath *a_Provider
  887. ) ;
  888. HRESULT Load (
  889. Enum_PropertyMask a_Mask ,
  890. IWbemPath *a_Scope,
  891. IWbemClassObject *a_Class
  892. ) ;
  893. HRESULT Load (
  894. Enum_PropertyMask a_Mask ,
  895. IWbemPath *a_Scope,
  896. LPCWSTR a_Provider
  897. ) ;
  898. HRESULT Load (
  899. Enum_PropertyMask a_Mask ,
  900. IWbemPath *a_Scope,
  901. IWbemPath *a_Provider
  902. ) ;
  903. BOOL SupportsMethods () { return m_SupportsMethods ; }
  904. BOOL Supported () { return m_Supported ; }
  905. HRESULT GetResult () { return m_Result ; }
  906. };
  907. /******************************************************************************
  908. *
  909. * Name:
  910. *
  911. *
  912. * Description:
  913. *
  914. *
  915. *****************************************************************************/
  916. class CServerObject_EventProviderRegistrationV1
  917. {
  918. private:
  919. LONG m_ReferenceCount ;
  920. protected:
  921. HRESULT m_Result ;
  922. BOOL m_Supported ;
  923. IWbemContext *m_Context ;
  924. IWbemPath *m_Namespace ;
  925. IWbemServices *m_Repository ;
  926. private:
  927. static LPCWSTR s_Strings_Class ;
  928. static LPCWSTR s_Strings_EventProviderRegistration ;
  929. protected:
  930. HRESULT QueryRepositoryUsingQuery (
  931. Enum_PropertyMask a_Mask ,
  932. IWbemPath *a_Scope,
  933. BSTR a_Query
  934. ) ;
  935. public: /* Internal */
  936. CServerObject_EventProviderRegistrationV1 () ;
  937. ~CServerObject_EventProviderRegistrationV1 () ;
  938. ULONG AddRef () ;
  939. ULONG Release () ;
  940. HRESULT SetContext (
  941. IWbemContext *a_Context ,
  942. IWbemPath *a_Namespace ,
  943. IWbemServices *a_Repository
  944. ) ;
  945. HRESULT QueryProperties (
  946. Enum_PropertyMask a_Mask ,
  947. IWbemClassObject *a_Object
  948. ) ;
  949. HRESULT QueryRepository (
  950. Enum_PropertyMask a_Mask ,
  951. IWbemPath *a_Scope,
  952. LPCWSTR a_ProviderName
  953. ) ;
  954. HRESULT QueryRepository (
  955. Enum_PropertyMask a_Mask ,
  956. IWbemPath *a_Scope,
  957. IWbemPath *a_Provider
  958. ) ;
  959. HRESULT Load (
  960. Enum_PropertyMask a_Mask ,
  961. IWbemPath *a_Scope,
  962. IWbemClassObject *a_Class
  963. ) ;
  964. HRESULT Load (
  965. Enum_PropertyMask a_Mask ,
  966. IWbemPath *a_Scope,
  967. LPCWSTR a_Provider
  968. ) ;
  969. HRESULT Load (
  970. Enum_PropertyMask a_Mask ,
  971. IWbemPath *a_Scope,
  972. IWbemPath *a_Provider
  973. ) ;
  974. BOOL Supported () { return m_Supported ; }
  975. HRESULT GetResult () { return m_Result ; }
  976. };
  977. /******************************************************************************
  978. *
  979. * Name:
  980. *
  981. *
  982. * Description:
  983. *
  984. *
  985. *****************************************************************************/
  986. class CServerObject_EventConsumerProviderRegistrationV1
  987. {
  988. private:
  989. LONG m_ReferenceCount ;
  990. protected:
  991. HRESULT m_Result ;
  992. BOOL m_Supported ;
  993. IWbemContext *m_Context ;
  994. IWbemPath *m_Namespace ;
  995. IWbemServices *m_Repository ;
  996. private:
  997. static LPCWSTR s_Strings_Class ;
  998. static LPCWSTR s_Strings_EventConsumerProviderRegistration ;
  999. protected:
  1000. HRESULT QueryRepositoryUsingQuery (
  1001. Enum_PropertyMask a_Mask ,
  1002. IWbemPath *a_Scope,
  1003. BSTR a_Query
  1004. ) ;
  1005. public: /* Internal */
  1006. CServerObject_EventConsumerProviderRegistrationV1 () ;
  1007. ~CServerObject_EventConsumerProviderRegistrationV1 () ;
  1008. ULONG AddRef () ;
  1009. ULONG Release () ;
  1010. HRESULT SetContext (
  1011. IWbemContext *a_Context ,
  1012. IWbemPath *a_Namespace ,
  1013. IWbemServices *a_Repository
  1014. ) ;
  1015. HRESULT QueryProperties (
  1016. Enum_PropertyMask a_Mask ,
  1017. IWbemClassObject *a_Object
  1018. ) ;
  1019. HRESULT QueryRepository (
  1020. Enum_PropertyMask a_Mask ,
  1021. IWbemPath *a_Scope,
  1022. LPCWSTR a_ProviderName
  1023. ) ;
  1024. HRESULT QueryRepository (
  1025. Enum_PropertyMask a_Mask ,
  1026. IWbemPath *a_Scope,
  1027. IWbemPath *a_Provider
  1028. ) ;
  1029. HRESULT Load (
  1030. Enum_PropertyMask a_Mask ,
  1031. IWbemPath *a_Scope,
  1032. IWbemClassObject *a_Class
  1033. ) ;
  1034. HRESULT Load (
  1035. Enum_PropertyMask a_Mask ,
  1036. IWbemPath *a_Scope,
  1037. LPCWSTR a_Provider
  1038. ) ;
  1039. HRESULT Load (
  1040. Enum_PropertyMask a_Mask ,
  1041. IWbemPath *a_Scope,
  1042. IWbemPath *a_Provider
  1043. ) ;
  1044. BOOL Supported () { return m_Supported ; }
  1045. HRESULT GetResult () { return m_Result ; }
  1046. };
  1047. /******************************************************************************
  1048. *
  1049. * Name:
  1050. *
  1051. *
  1052. * Description:
  1053. *
  1054. *
  1055. *****************************************************************************/
  1056. class CServerObject_DynamicPropertyProviderRegistrationV1
  1057. {
  1058. private:
  1059. LONG m_ReferenceCount ;
  1060. protected:
  1061. HRESULT m_Result ;
  1062. BOOL m_Supported ;
  1063. BOOL m_SupportsPut ;
  1064. BOOL m_SupportsGet ;
  1065. IWbemContext *m_Context ;
  1066. IWbemPath *m_Namespace ;
  1067. IWbemServices *m_Repository ;
  1068. private:
  1069. static LPCWSTR s_Strings_Class ;
  1070. static LPCWSTR s_Strings_PropertyProviderRegistration ;
  1071. static LPCWSTR s_Strings_SupportsPut ;
  1072. static LPCWSTR s_Strings_SupportsGet ;
  1073. protected:
  1074. HRESULT QueryRepositoryUsingQuery (
  1075. Enum_PropertyMask a_Mask ,
  1076. IWbemPath *a_Scope,
  1077. BSTR a_Query
  1078. ) ;
  1079. public: /* Internal */
  1080. CServerObject_DynamicPropertyProviderRegistrationV1 () ;
  1081. ~CServerObject_DynamicPropertyProviderRegistrationV1 () ;
  1082. ULONG AddRef () ;
  1083. ULONG Release () ;
  1084. HRESULT SetContext (
  1085. IWbemContext *a_Context ,
  1086. IWbemPath *a_Namespace ,
  1087. IWbemServices *a_Repository
  1088. ) ;
  1089. HRESULT QueryProperties (
  1090. Enum_PropertyMask a_Mask ,
  1091. IWbemClassObject *a_Object
  1092. ) ;
  1093. HRESULT QueryRepository (
  1094. Enum_PropertyMask a_Mask ,
  1095. IWbemPath *a_Scope,
  1096. LPCWSTR a_ProviderName
  1097. ) ;
  1098. HRESULT QueryRepository (
  1099. Enum_PropertyMask a_Mask ,
  1100. IWbemPath *a_Scope,
  1101. IWbemPath *a_Provider
  1102. ) ;
  1103. HRESULT Load (
  1104. Enum_PropertyMask a_Mask ,
  1105. IWbemPath *a_Scope,
  1106. IWbemClassObject *a_Class
  1107. ) ;
  1108. HRESULT Load (
  1109. Enum_PropertyMask a_Mask ,
  1110. IWbemPath *a_Scope,
  1111. LPCWSTR a_Provider
  1112. ) ;
  1113. HRESULT Load (
  1114. Enum_PropertyMask a_Mask ,
  1115. IWbemPath *a_Scope,
  1116. IWbemPath *a_Provider
  1117. ) ;
  1118. BOOL SupportsPut () { return m_SupportsPut ; }
  1119. BOOL SupportsGet () { return m_SupportsGet ; }
  1120. BOOL Supported () { return m_Supported ; }
  1121. HRESULT GetResult () { return m_Result ; }
  1122. };
  1123. /******************************************************************************
  1124. *
  1125. * Name:
  1126. *
  1127. *
  1128. * Description:
  1129. *
  1130. *
  1131. *****************************************************************************/
  1132. class CServerObject_ProviderRegistrationV1
  1133. {
  1134. private:
  1135. LONG m_ReferenceCount ;
  1136. private:
  1137. static LPCWSTR s_Strings_Class ;
  1138. static LPCWSTR s_Strings_ClassProviderRegistration ;
  1139. static LPCWSTR s_Strings_InstanceProviderRegistration ;
  1140. static LPCWSTR s_Strings_MethodProviderRegistration ;
  1141. static LPCWSTR s_Strings_PropertyProviderRegistration ;
  1142. static LPCWSTR s_Strings_EventProviderRegistration ;
  1143. static LPCWSTR s_Strings_EventConsumerProviderRegistration ;
  1144. protected:
  1145. HRESULT m_Result ;
  1146. CServerObject_ComProviderRegistrationV1 m_ComRegistration ;
  1147. CServerObject_ClassProviderRegistrationV1 m_ClassProviderRegistration ;
  1148. CServerObject_InstanceProviderRegistrationV1 m_InstanceProviderRegistration ;
  1149. CServerObject_MethodProviderRegistrationV1 m_MethodProviderRegistration ;
  1150. CServerObject_DynamicPropertyProviderRegistrationV1 m_PropertyProviderRegistration ;
  1151. CServerObject_EventProviderRegistrationV1 m_EventProviderRegistration ;
  1152. CServerObject_EventConsumerProviderRegistrationV1 m_EventConsumerProviderRegistration ;
  1153. IWbemContext *m_Context ;
  1154. IWbemPath *m_Namespace ;
  1155. IWbemServices *m_Repository ;
  1156. protected:
  1157. HRESULT QueryRepositoryUsingQuery (
  1158. Enum_PropertyMask a_Mask ,
  1159. IWbemPath *a_Scope,
  1160. BSTR a_Query
  1161. ) ;
  1162. public: /* Internal */
  1163. CServerObject_ProviderRegistrationV1 () ;
  1164. ~CServerObject_ProviderRegistrationV1 () ;
  1165. ULONG AddRef () ;
  1166. ULONG Release () ;
  1167. HRESULT SetContext (
  1168. IWbemContext *a_Context ,
  1169. IWbemPath *a_Namespace ,
  1170. IWbemServices *a_Repository
  1171. ) ;
  1172. HRESULT QueryRepository (
  1173. Enum_PropertyMask a_Mask ,
  1174. IWbemPath *a_Scope,
  1175. LPCWSTR a_ProviderName
  1176. ) ;
  1177. HRESULT QueryRepository (
  1178. Enum_PropertyMask a_Mask ,
  1179. IWbemPath *a_Scope,
  1180. IWbemPath *a_Provider
  1181. ) ;
  1182. HRESULT Load (
  1183. Enum_PropertyMask a_Mask ,
  1184. IWbemPath *a_Scope,
  1185. IWbemClassObject *a_Class
  1186. ) ;
  1187. HRESULT Load (
  1188. Enum_PropertyMask a_Mask ,
  1189. IWbemPath *a_Scope,
  1190. LPCWSTR a_Provider
  1191. ) ;
  1192. HRESULT Load (
  1193. Enum_PropertyMask a_Mask ,
  1194. IWbemPath *a_Scope,
  1195. IWbemPath *a_Provider
  1196. ) ;
  1197. const CLSID &GetClsid () { return m_ComRegistration.GetClsid () ; }
  1198. BOOL PerUserInitialization () { return m_ComRegistration.PerUserInitialization () ; }
  1199. BOOL PerLocaleInitialization () { return m_ComRegistration.PerLocaleInitialization () ; }
  1200. Enum_InitializationReentrancy GetInitializationReentrancy () { return m_ComRegistration.GetInitializationReentrancy () ; }
  1201. Enum_ThreadingModel GetThreadingModel () { return m_ComRegistration.GetThreadingModel () ; }
  1202. Enum_Hosting GetHosting () { return m_ComRegistration.GetHosting () ; }
  1203. LPCWSTR GetHostingGroup () { return m_ComRegistration.GetHostingGroup () ; }
  1204. ULONG GetUnloadTimeoutMilliSeconds () { return m_ComRegistration.GetUnloadTimeoutMilliSeconds () ; }
  1205. wchar_t *GetProviderName () { return m_ComRegistration.GetProviderName () ; }
  1206. CServerObject_ComProviderRegistrationV1 &GetComRegistration () { return m_ComRegistration ; }
  1207. IWbemClassObject *GetIdentity () { return m_ComRegistration.GetIdentity () ; }
  1208. CServerObject_ClassProviderRegistrationV1 &GetClassProviderRegistration () { return m_ClassProviderRegistration ; }
  1209. CServerObject_InstanceProviderRegistrationV1 &GetInstanceProviderRegistration () { return m_InstanceProviderRegistration ; }
  1210. CServerObject_MethodProviderRegistrationV1 &GetMethodProviderRegistration () { return m_MethodProviderRegistration ; }
  1211. CServerObject_DynamicPropertyProviderRegistrationV1 &GetPropertyProviderRegistration () { return m_PropertyProviderRegistration ; }
  1212. CServerObject_EventProviderRegistrationV1 &GetEventProviderRegistration () { return m_EventProviderRegistration ; }
  1213. CServerObject_EventConsumerProviderRegistrationV1 &GetEventConsumerProviderRegistration () { return m_EventConsumerProviderRegistration ; }
  1214. void SetUnloadTimeoutMilliSeconds ( ULONG a_UnloadTimeoutMilliSeconds ) { m_ComRegistration.SetUnloadTimeoutMilliSeconds ( a_UnloadTimeoutMilliSeconds ) ; }
  1215. ULONG GetInitializationTimeoutMilliSeconds () { return m_ComRegistration.GetInitializationTimeoutMilliSeconds () ; }
  1216. HRESULT GetResult () { return m_Result ; }
  1217. BOOL ObjectProvider () ;
  1218. BOOL EventProvider () ;
  1219. };
  1220. #endif // _Server_ProviderRegistrationInfo_H