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.

458 lines
16 KiB

  1. // classes for WMI extensions to Group Policy
  2. #pragma autorecover
  3. #pragma namespace("\\\\.\\Root")
  4. #pragma classflags ("forceupdate")
  5. Qualifier Description : ToSubClass Amended;
  6. Instance of __Namespace
  7. {
  8. Name = "Policy";
  9. };
  10. #pragma namespace("\\\\.\\Root\\Policy")
  11. Instance of __Namespace
  12. {
  13. Name = "History";
  14. };
  15. Instance of __Win32Provider as $PolicRange
  16. {
  17. Name = "PolicRange";
  18. ClsId = "{AAEAE72C-0328-4763-8ECB-23422EDE2DB5}";
  19. ImpersonationLevel = 1;
  20. PerUserInitialization = "FALSE";
  21. HostingModel = "WmiCore";
  22. };
  23. Instance of __MethodProviderRegistration
  24. {
  25. Provider = $PolicRange;
  26. };
  27. Instance of __Win32Provider as $PolicTempl
  28. {
  29. Name = "PolicTempl";
  30. ClsId = "{AAEAE72D-0328-4763-8ECB-23422EDE2DB5}";
  31. ImpersonationLevel = 1;
  32. PerUserInitialization = "FALSE";
  33. HostingModel = "WmiCore";
  34. };
  35. Instance of __InstanceProviderRegistration
  36. {
  37. Provider = $PolicTempl;
  38. SupportsGet = "TRUE";
  39. SupportsPut = "TRUE";
  40. SupportsDelete = "TRUE";
  41. QuerySupportLevels = {"WQL:UnarySelect"};
  42. };
  43. Instance of __MethodProviderRegistration
  44. {
  45. Provider = $PolicTempl;
  46. };
  47. Instance of __Win32Provider as $PolicSOM
  48. {
  49. Name = "PolicSOM";
  50. ClsId = "{AAEAE72F-0328-4763-8ECB-23422EDE2DB5}";
  51. ImpersonationLevel = 1;
  52. PerUserInitialization = "FALSE";
  53. HostingModel = "WmiCore";
  54. };
  55. Instance of __InstanceProviderRegistration
  56. {
  57. Provider = $PolicSOM;
  58. SupportsGet = "TRUE";
  59. SupportsPut = "TRUE";
  60. SupportsDelete = "TRUE";
  61. QuerySupportLevels = {"WQL:UnarySelect"};
  62. };
  63. Instance of __MethodProviderRegistration
  64. {
  65. Provider = $PolicSOM;
  66. };
  67. Instance of __Win32Provider as $PolicType
  68. {
  69. Name = "PolicType";
  70. ClsId = "{AAEAE72E-0328-4763-8ECB-23422EDE2DB5}";
  71. ImpersonationLevel = 1;
  72. PerUserInitialization = "FALSE";
  73. HostingModel = "WmiCore";
  74. };
  75. Instance of __InstanceProviderRegistration
  76. {
  77. Provider = $PolicType;
  78. SupportsGet = "TRUE";
  79. SupportsPut = "TRUE";
  80. SupportsDelete = "TRUE";
  81. QuerySupportLevels = {"WQL:UnarySelect"};
  82. };
  83. Instance of __MethodProviderRegistration
  84. {
  85. Provider = $PolicType;
  86. };
  87. Instance of __Win32Provider as $PolicGpo
  88. {
  89. Name = "PolicGpo";
  90. ClsId = "{AAEAE72B-0328-4763-8ECB-23422EDE2DB5}";
  91. ImpersonationLevel = 1;
  92. PerUserInitialization = "FALSE";
  93. HostingModel = "WmiCore";
  94. };
  95. Instance of __InstanceProviderRegistration
  96. {
  97. Provider = $PolicGpo;
  98. SupportsGet = "TRUE";
  99. SupportsPut = "TRUE";
  100. SupportsDelete = "TRUE";
  101. };
  102. [Abstract, Locale(1033) : ToInstance, UUID("{63E29F85-6AF4-492e-A605-90E590F3FBA7}"),
  103. Description("range param class is the basis of the PolicyTemplate "
  104. "it describes one mergeable property of the target instance"), Provider("PolicRange")]
  105. class MSFT_RangeParam
  106. {
  107. [write, NOT_NULL, Description("Name of property to be created")]
  108. string PropertyName;
  109. [write, Description("CIM Type of property, if Cim_Object then TargetClass gives user defined class")]
  110. uint8 TargetType;
  111. [write, Description("If TargetType is Cim_Object, then this contains class name")]
  112. string TargetClass;
  113. [Implemented, Static, Description("merges ranges into a single object")]
  114. sint32 Merge ([in] MSFT_RangeParam ranges[], [out] MSFT_RangeParam mergedRange, [out] sint32 conflict);
  115. [Implemented, Static, Description("Places property into the object being created by the PolicyTemplate")]
  116. sint32 Resolve ([in] MSFT_RangeParam mergedRange, [in, out] object obj);
  117. };
  118. [Abstract, Locale(1033) : ToInstance, UUID("{36E79DE7-9CEA-4cb7-9F65-12A95B6280EC}"),
  119. Description("Defines a default and acceptable range for a signed integer property")]
  120. class MSFT_SintRangeParam : MSFT_RangeParam
  121. {
  122. [write, Description("Desired value for the corresponding target instance property")]
  123. sint32 Default;
  124. [write, Description("Smallest allowable value for the corresponding target instance property")]
  125. sint32 Min;
  126. [write, Description("Largest allowable value for the corresponding target instance property")]
  127. sint32 Max;
  128. };
  129. [Abstract, Locale(1033) : ToInstance, UUID("{DB3F40A1-F91D-4de4-BDCE-C6F315A867DF}"),
  130. Description("Defines a default and acceptable range for an unsigned integer property")]
  131. class MSFT_UintRangeParam : MSFT_RangeParam
  132. {
  133. [write, Description("Desired value for the corresponding target instance property")]
  134. uint32 Default;
  135. [write, Description("Smallest allowable value for the corresponding target instance property")]
  136. uint32 Min;
  137. [write, Description("Largest allowable value for the corresponding target instance property")]
  138. uint32 Max;
  139. };
  140. [Abstract, Locale(1033) : ToInstance, UUID("{5D73662C-698B-4b1f-9B0A-7F8948EC2155}"),
  141. Description("Defines a default and acceptable range for a real number property")]
  142. class MSFT_RealRangeParam : MSFT_RangeParam
  143. {
  144. [write, Description("Desired value for the corresponding target instance property")]
  145. Real64 Default;
  146. [write, Description("Smallest allowable value for the corresponding target instance property")]
  147. Real64 Min;
  148. [write, Description("Largest allowable value for the corresponding target instance property")]
  149. Real64 Max;
  150. };
  151. [Abstract, Locale(1033) : ToInstance, UUID("{DF926AD7-A988-4012-B52E-9E90DB5D8760}"),
  152. Description("Defines a default and list of valid values for a signed integer property")]
  153. class MSFT_SintSetParam : MSFT_RangeParam
  154. {
  155. [write, Description("Desired value for the corresponding target instance property")]
  156. sint32 Default;
  157. [write, Description("List of allowable values for the corresponding target instance property")]
  158. sint32 ValidValues[];
  159. };
  160. [Abstract, Locale(1033) : ToInstance, UUID("{F7655F46-3379-484c-8171-E3324E2F3A13}"),
  161. Description("Defines a default and list of valid values for an unsigned integer property")]
  162. class MSFT_UintSetParam : MSFT_RangeParam
  163. {
  164. [write, Description("Desired value for the corresponding target instance property")]
  165. uint32 Default;
  166. [write, Description("List of allowable values for the corresponding target instance property")]
  167. uint32 ValidValues[];
  168. };
  169. [Abstract, Locale(1033) : ToInstance, UUID("{CC1EA62B-F2EC-4243-B217-78480D1D76C7}"),
  170. Description("Defines a default and list of valid values for a string property")]
  171. class MSFT_StringSetParam : MSFT_RangeParam
  172. {
  173. [write, Description("Desired value for the corresponding target instance property")]
  174. string Default;
  175. [write, Description("List of allowable values for the corresponding target instance property")]
  176. string ValidValues[];
  177. };
  178. [Abstract, Locale(1033) : ToInstance, UUID("{4520D53D-3E9B-4492-AA92-9C70FC869A1E}"),
  179. Description("Policy template provides a 'recipe' for creating a class instance")]
  180. class MSFT_PolicyTemplate
  181. {
  182. [key, write, MaxLen(38), Description("Unique identifier for this instance, expected to be a GUID in registry format")]
  183. string ID;
  184. [key, write, Description("Domain of this object, in DNS format: \"redmond.corp.microsoft.com\"")]
  185. String Domain;
  186. [write, Description("Descriptive text describing this Policy Template")]
  187. String Description;
  188. [write, Description("PolicyType which defines the schema for the target instance, may be NULL"
  189. " in which case, the class definition is assumed to be present on the target machine.")]
  190. MSFT_PolicyType REF TargetType;
  191. [write, Description("A user-friendly name for this template")]
  192. string Name;
  193. [write, NOT_NULL, Description("Namespace in which Target Object is to be created")]
  194. string TargetNamespace;
  195. [write, Description("Class name of the policy object to be created")]
  196. string TargetClass;
  197. [write, Description("Denotes the class instance to be created on the target machine "
  198. "if class is singleton, then TargetPath is the class name "
  199. "if class has keys, then TargetPath is relative object path "
  200. )]
  201. string TargetPath;
  202. [write, Description("Originator of this PolicyTemplate")]
  203. String Author;
  204. [write, Description("Author's organinzation")]
  205. String SourceOrganization;
  206. [write, Description("Last time this object was updated")]
  207. DateTime ChangeDate;
  208. [write, Description("Time that this object was created")]
  209. DateTime CreationDate;
  210. };
  211. [Dynamic,Provider("PolicTempl"), Locale(1033) : ToInstance, UUID("{6CD2FC3F-EEE7-48e9-AC55-8827496E2389}"),
  212. Description("used in cases where the target object is not intended to be combined")]
  213. class MSFT_SimplePolicyTemplate : MSFT_PolicyTemplate
  214. {
  215. [Description("The single object to be created as a result of applying this policy")]
  216. object TargetObject;
  217. };
  218. [Dynamic,Provider("PolicTempl"), Locale(1033) : ToInstance, UUID("{F9E466F8-CFCC-4fa2-B4DE-8338F85C9CC1}"),
  219. Description("Provides a policy template that can be merged with other templates")]
  220. class MSFT_MergeablePolicyTemplate : MSFT_PolicyTemplate
  221. {
  222. [write, Description("Settings which describe the desired property values "
  223. "for the target instance.")]
  224. MSFT_RangeParam RangeSettings[];
  225. [Implemented, Static, Description("Merges all like objects into one showing merged output "
  226. "if merge is successful, then resultant object is returned in obj")]
  227. Sint32 Merge([IN] MSFT_PolicyTemplate templateList[], [OUT] MSFT_PolicyTemplate mergedTemplate);
  228. [Implemented, Static, Description("Resolves a single merged object into target class instance")]
  229. Sint32 Resolve([IN] MSFT_PolicyTemplate template, [OUT] Object obj);
  230. [Implemented, Static, Description("Initializes template with values from base")]
  231. Sint32 Set([IN] Object base, [OUT] MSFT_PolicyTemplate PolicyObj);
  232. [Implemented, Static, Description("Sets a single range in RangeSettings")]
  233. Sint32 SetRange([IN, OUT] MSFT_PolicyTemplate PolicyObj, [IN] MSFT_RangeParam rangeSetting);
  234. };
  235. [Abstract, Locale(1033) : ToInstance, UUID("{D157AAFD-D42F-45cd-B30B-F67CF152C9F9}"),
  236. Description("Defines a single rule in a SOM, expressed as a query")]
  237. class MSFT_Rule
  238. {
  239. [NOT_NULL, write, Description("Language in which query is expressed")]
  240. string QueryLanguage;
  241. [NOT_NULL, write, Description("Namespace in which to evaluate query")]
  242. string TargetNameSpace;
  243. [NOT_NULL, write, Description("Query of interest")]
  244. string Query;
  245. };
  246. [Dynamic,Provider("PolicSOM"), Locale(1033) : ToInstance, UUID("{AE7B614F-AFE0-41ea-807E-3BD3F83CAF66}"),
  247. Description("Provides a list of rules, expressed as queries "
  248. "which are evaluated on target machine")]
  249. class MSFT_SomFilter
  250. {
  251. [key, write, MaxLen(38), Description("Unique identifier for this instance, expected to be a GUID in registry format")]
  252. string ID;
  253. [key, write, Description("Domain of this object, in DNS format: \"redmond.corp.microsoft.com\"")]
  254. String Domain;
  255. [write, Description("A user-friendly name for this Som Filter")]
  256. string Name;
  257. [write, Description("Descriptive text describing this Som Filter")]
  258. String Description;
  259. [write, NOT_NULL, Description("Rules to be evaluated")]
  260. MSFT_Rule Rules[];
  261. [Implemented, Description("Determines whether the queries expressed in Rules apply to this machine. "
  262. "Returns S_OK (0) if all queries expressed in rules return results; "
  263. "S_FALSE (1) if they do not; and an applicable WMI error code if an error occurs.")]
  264. Uint32 Evaluate();
  265. [Implemented, Static, Description("evaluates a list of SOMs, returns array result codes matching result of evaluating each")]
  266. Uint32 BatchEvaluate([IN] MSFT_SomFilter REF filters[], [OUT]Uint32 results[]);
  267. [write, Description("Originator of this SomFilter")]
  268. String Author;
  269. [write, Description("Author's organinzation")]
  270. String SourceOrganization;
  271. [write, Description("Last time this object was updated")]
  272. DateTime ChangeDate;
  273. [write, Description("Time that this object was created")]
  274. DateTime CreationDate;
  275. };
  276. [Dynamic,Provider("PolicType"), Locale(1033) : ToInstance, UUID("{61FBBE9B-1016-4004-9ACC-0174F5EA4E80}"),
  277. Description("Communicate schema for policy objects")]
  278. class MSFT_PolicyType
  279. {
  280. [key, write, MaxLen(38), Description("Unique identifier for this instance, expected to be a GUID in registry format")]
  281. string ID;
  282. [key, write, Description("Domain of this object, in DNS format: \"redmond.corp.microsoft.com\"")]
  283. String Domain;
  284. [write, Description("Descriptive text describing this Policy Type")]
  285. String Description;
  286. [write, NOT_NULL, Description("Defines class used by PolicyTemplate")]
  287. Object ClassDefinition;
  288. [write, Description("Any additional class instances needed to define a policy "
  289. "These will be TemplateBuilders in the case of a CorrelatorTemplate")]
  290. Object InstanceDefinitions[];
  291. [write, Description("Originator of this PolicyType")]
  292. String Author;
  293. [write, Description("Author's organinzation")]
  294. String SourceOrganization;
  295. [write, Description("Last time this object was updated")]
  296. DateTime ChangeDate;
  297. [write, Description("Time that this object was created")]
  298. DateTime CreationDate;
  299. };
  300. [Dynamic,Provider("PolicGPO"), Locale(1033) : ToInstance, UUID("{074A24E3-F15C-43dc-A494-865428C58FB7}"),
  301. Description("Specifies the policy template to be delivered to the target machine"
  302. "written to container specified by DsPath property")]
  303. class MSFT_WMIGPO
  304. {
  305. [key, write, Description("Complete path of the container in which this WMIGPO resides, in LDAP format")]
  306. String DsPath;
  307. [write, NOT_NULL, Description("references to the associated PolicyTemplates")]
  308. MSFT_PolicyTemplate REF PolicyTemplate[];
  309. [read, Description("Domain of this object, in DNS format: \"redmond.corp.microsoft.com\"")]
  310. String Domain;
  311. };
  312. #pragma namespace("\\\\.\\Root\\Policy\\History")
  313. // this schema is nearly a duplicate of the RSOP schema
  314. // without the RSOP base classes
  315. [Locale(1033) : ToInstance, UUID("{2B159066-C652-474f-A49C-2482FB3F8517}"),
  316. Description("Corresponds to the MSFT_WMIGPO class")]
  317. class MSFT_WMIGPOPolicySetting
  318. {
  319. [key, Description("a unique identifier for instances of this class")]
  320. string ID;
  321. [write, Description("templates delivered as part of this GPO")]
  322. RSOP_AppliedPolicyTemplate REF templates[];
  323. };
  324. [Locale(1033) : ToInstance, UUID("{D044BDC4-37A7-43a1-9338-1F1D06577D9F}"),
  325. Description("wrapper to encapsulate MSFT_PolicyTemplate")]
  326. class MSFT_AppliedPolicyTemplate
  327. {
  328. [write, key, Description("relpath of the template")]
  329. string templatePath;
  330. [write, Description("template delivered")]
  331. MSFT_PolicyTemplate template;
  332. };
  333. [Locale(1033) : ToInstance, UUID("{8BE067B0-B388-4bb1-8A1C-A4AF2E70AA0B}"),
  334. Description("wrapper to encapsulate MSFT_PolicyType")]
  335. class MSFT_AppliedPolicyType
  336. {
  337. [write, key, Description("relpath of the type")]
  338. string typePath;
  339. [write, Description("Type object delivered")]
  340. MSFT_PolicyType type;
  341. };
  342. [Locale(1033) : ToInstance, UUID("{AD34AA24-64A0-4398-B0CF-887BD66F7D10}"),
  343. Description("object that is created by WMI Policy engine")]
  344. class MSFT_WmiTargetObject
  345. {
  346. [key, write, Description("object is identified by path of target object")]
  347. string targetPath;
  348. [write, Description("templates that participated to create this target object")]
  349. RSOP_AppliedPolicyTemplate REF templates[];
  350. [write, Description("type object associated with these templates")]
  351. RSOP_AppliedPolicyType REF type;
  352. [write, Description("resultant of merging the templates")]
  353. MSFT_PolicyTemplate MergedTemplate;
  354. [write, Description("object created by resolving the merged template")]
  355. Object TargetInstance;
  356. };