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.

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