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.

408 lines
12 KiB

  1. // Standard MOF for provider registration
  2. [abstract]
  3. class __Provider : __SystemClass
  4. {
  5. [key] string Name;
  6. };
  7. class __Win32Provider : __Provider
  8. {
  9. [not_null: DisableOverride ToInstance ToSubClass]
  10. string CLSID;
  11. string ClientLoadableCLSID;
  12. string DefaultMachineName;
  13. [SUBTYPE("interval"): ToInstance ToSubClass]
  14. datetime UnloadTimeout;
  15. boolean InitializeAsAdminFirst; // Only valid in LocalSystem & In-Proc cases
  16. [Values{"None", "ClientImpersonation" }: ToSubClass]
  17. sint32 ImpersonationLevel = 0; // Informational, tells whether the provider actually
  18. // attempts to impersonate the client
  19. [Values{"CLSID", "Namespace", "COM Object"}: ToSubClass]
  20. sint32 InitializationReentrancy = 0;
  21. boolean PerUserInitialization = FALSE;
  22. boolean PerLocaleInitialization = FALSE;
  23. boolean Pure = TRUE; // We want to deprecate impure providers
  24. // Extensions //////////////////////////////////////////
  25. // 0 means using global settings for all providers unless overridden
  26. [Values {"WmiCore", // Hosted within CIMOM
  27. "SharedLocalSysHost", // In shared local system process
  28. "SharedNetSvcHost", // In shared Network Service process
  29. "SharedPerUserHost", // In shared per-user process
  30. "DedicatedLocalSysHost", // In dedicated local system host
  31. "DedicatedNetSvcHost", // In dedicated network service host
  32. "DedicatedPerUserHost", // In dedicated per-user host
  33. "SelfHost", // Separate COM EXE
  34. "Decoupled" //
  35. }
  36. ]
  37. string PossibleHostingModels;
  38. string CurrentHostingModel;
  39. [configurable]
  40. sint32 MaxConcurrentQueries = 0;
  41. [configurable]
  42. sint32 MaxConcurrentPendingCalls = 0;
  43. [configurable]
  44. sint32 MaxConcurrentDeliveredThreads = 0;
  45. boolean Enabled = true;
  46. boolean ClientLoadable = false; // Always load in client
  47. boolean SupportsExplicitShutdown = false;
  48. boolean ExtendedStatusSupport = false;
  49. boolean SupportsThrottling = false;
  50. boolean SupportsQuotas = false;
  51. interval NormalInitTime = null;
  52. interval TimeBeforeErrorOnRequests = null;
  53. uint8 ProviderSecurityDescriptor[];
  54. };
  55. [abstract]
  56. class __ProviderRegistration : __SystemClass
  57. {
  58. __Provider ref provider;
  59. };
  60. [abstract]
  61. class __ObjectProviderRegistration : __ProviderRegistration
  62. {
  63. boolean SupportsPut = FALSE;
  64. boolean SupportsGet = FALSE;
  65. boolean SupportsDelete = FALSE;
  66. boolean SupportsEnumeration = FALSE;
  67. // Extensions: Added SQL to the following ValueMap
  68. [ValueMap{"WQL:UnarySelect", "WQL:References", "WQL:Associators", "WQL:V1ProviderDefined", "SQL"}: ToSubClass]
  69. string QuerySupportLevels[];
  70. [Values{"Pull", "Push", "PushVerify"}: ToSubClass]
  71. sint32 InteractionType = 0;
  72. // Extensions ///////////////////////////////////////////////
  73. [description("add ")]
  74. boolean SupportsDeepOperations = false; // If true, for inst or class providers,
  75. // separate subclass calls won't be made.
  76. uint32 QueryLanguageFeatures[]; // LFn features from Query Spec
  77. boolean BatchingSupport = false; // Reserved for future use
  78. boolean SupportsWmiTransactions = false;
  79. };
  80. class __InstanceProviderRegistration : __ObjectProviderRegistration
  81. {
  82. [key] __Provider ref provider;
  83. boolean PerPropertyOperations = false;
  84. };
  85. class __ClassProviderRegistration : __ObjectProviderRegistration
  86. {
  87. [key] __Provider ref provider;
  88. string ResultSetQueries[];
  89. // Use LIKE operator in query to specify schema prefix
  90. string ReferencedSetQueries[];
  91. string UnsupportedQueries[];
  92. // Extensions
  93. interval NormalRefreshInterval; // NULL=forever
  94. boolean ResyncOnNsOpen;
  95. boolean PerUserSchema;
  96. boolean V1AccessModel = false;
  97. boolean SupportsDirectedCreate;
  98. boolean ForceResync();
  99. };
  100. class __PropertyProviderRegistration : __ProviderRegistration
  101. {
  102. [key] __Provider ref provider;
  103. boolean SupportsPut = FALSE;
  104. boolean SupportsGet = FALSE;
  105. };
  106. class MSFT_DecoupledProvider : __Win32Provider
  107. {
  108. [Description ( "Decoupled provider CLSID, do not change." ) ,Override("Clsid")]
  109. String Clsid = "{c3e36a42-97d0-4b21-ac18-d2e4ea8afa9f}" ;
  110. [Description ( "CLSID of the actual de-coupled provider." ) ,
  111. not_null: DisableOverride ToInstance ToSubClass]
  112. String Decoupled_CLSID;
  113. } ;
  114. ///////////// EVENTS //////////////////////////////////////////////
  115. [singleton]
  116. class MSFT_WmiProviderSubsystemEvent : __SelfInstrumentEvent
  117. {
  118. string ProviderName;
  119. string Namespace;
  120. uint32 HostProcessId;
  121. uint32 RelevantThreadId;
  122. [Values {"WmiCore", // Hosted within CIMOM
  123. "SharedLocalSysHost", // In shared local system process
  124. "SharedNetSvcHost", // In shared Network Service process
  125. "SharedPerUserHost", // In shared per-user process
  126. "DedicatedLocalSysHost", // In dedicated local system host
  127. "DedicatedNetSvcHost", // In dedicated network service host
  128. "DedicatedPerUserHost", // In dedicated per-user host
  129. "ClientOnly", // Client in-proc only
  130. "SelfHost", // Separate COM EXE
  131. "Decoupled" //
  132. }
  133. ]
  134. string HostingModel; // NULL when not applicable
  135. uint8 HostProcesSid[];
  136. // Timestamp properties already have the time
  137. };
  138. class MSFT_WmiProviderLoadFailure : MSFT_WmiProviderSubsystemEvent
  139. {
  140. uint32 COMHRESULT;
  141. };
  142. class MSFT_WmiProvSS_ProviderShutdownFailure : MSFT_WmiProviderSubsystemEvent
  143. {
  144. // Only if provider implements IWbemShutdown
  145. uint32 HRESULTFROMPROV;
  146. };
  147. class MSFT_WmiProviderFault : MSFT_WmiProviderSubsystemEvent
  148. {
  149. };
  150. class MSFT_WmiProviderTimeoutFailure : MSFT_WmiProviderSubsystemEvent
  151. {
  152. datetime Timeout;
  153. // Provider is not responding within the specified timeout
  154. };
  155. class MSFT_WmiProviderQuotaViolation : MSFT_WmiProviderSubsystemEvent
  156. {
  157. // Not sure what this means in shared hosts; presumably
  158. // we issue events for all providers that were there
  159. BOOL bThreadQuotaExceeded;
  160. BOOL bMemoryQuotaExceeded;
  161. BOOL bInSharedProcess;
  162. BOOL bInDedicatedProcess;
  163. };
  164. class MSFT_WmiProviderLoad : MSFT_WmiProviderSubsystemEvent
  165. {
  166. };
  167. class MSFT_WmiProviderShutdown : MSFT_WmiProviderSubsystemEvent
  168. {
  169. };
  170. class MSFT_WmiProviderInitialization : MSFT_WmiProviderSubsystemEvent
  171. {
  172. uint8 InitializationSid[];
  173. };
  174. class MSFT_WmiProviderInitializationFailure : MSFT_WmiProviderSubsystemEvent
  175. {
  176. uint8 InitializationSid[];
  177. uint32 ResultCode;
  178. object ErrorObject;
  179. };
  180. [description("")]
  181. class MSFT_WmiProviderCall
  182. {
  183. string Provider;
  184. string Namespace;
  185. uint32 API;
  186. string Parameter;
  187. };
  188. class MSFT_WmiProviderBusy : MSFT_WmiProviderSubsystemEvent
  189. {
  190. // Provider was too busy to service request (returned WBEM_E_SERVER_BUSY from calls)
  191. };
  192. class WMICORE_BUSY
  193. {
  194. };
  195. class MSFT_WmiProviderAbnormalTermination : MSFT_WmiProviderSubsystemEvent
  196. {
  197. };
  198. class MSFT_WmiForcedProviderStop : MSFT_WmiProviderSubsystemEvent
  199. {
  200. // Issued when prov ss methods are invoked.
  201. };
  202. class MSFT_WmiForcedProviderStart : MSFT_WmiProviderSubsystemEvent
  203. {
  204. };
  205. class MSFT_WmiForcedProviderUnload : MSFT_WmiProviderSubsystemEvent
  206. {
  207. };
  208. class MSFT_WmiForcedProviderLoad : MSFT_WmiProviderSubsystemEvent
  209. {
  210. // MSFT_WmiProviderLoad event also issued with pertinent data
  211. };
  212. class MSFT_WmiProviderHostLaunched : MSFT_WmiProviderSubsystemEvent
  213. {
  214. };
  215. class MSFT_WmiProviderHostTerminated : MSFT_WmiProviderSubsystemEvent
  216. {
  217. // A provider host was terminated
  218. };
  219. class MSFT_WmiDecoupledProviderBind : MSFT_WmiProviderSubsystemEvent
  220. {
  221. // Decoupled provider was located and bound
  222. };
  223. class MSFT_WmiDecoupledProviderBindFailure : MSFT_WmiProviderSubsystemEvent
  224. {
  225. // Decoupled provider was not running when needed
  226. };
  227. class MSFT_WmiDecoupledProviderUnbind : MSFT_WmiProviderSubsystemEvent
  228. {
  229. };
  230. ///////////// SELF-INSTRUMENTATION //////////////////////////////////////////////
  231. [singleton]
  232. class __ProviderHostProcessQuotas : __SystemQuota
  233. {
  234. uint32 MaxMemoryPerHostProcess;
  235. uint32 MaxMemoryForAllHostProcesses;
  236. uint32 MaxMemoryForNetSvcProcess;
  237. uint32 MaxMemoryForLocalSysProcess;
  238. uint32 MaxMemoryForPerUserProcess;
  239. uint32 MaxThreadsPerHostProcess;
  240. uint32 MaxThreadsForAllHostProcesses;
  241. uint32 MaxThreadsForNetSvcProcess;
  242. uint32 MaxThreadsForLocalSysProcess;
  243. uint32 MaxThreadsForPerUserProcess;
  244. };
  245. [singleton: DisableOverride ToInstance ToSubClass]
  246. class __ObjectProviderCacheControl : __CacheControl
  247. {
  248. [SUBTYPE("interval"): ToInstance ToSubClass] datetime ClearAfter;
  249. };
  250. [singleton]
  251. class __ProviderSubsystemControl : __SystemClass
  252. {
  253. bool SuspendProvider([in] string ProviderName);
  254. bool ResumeProvider([in] string ProviderName);
  255. bool LoadProvider([in] string ProviderName);
  256. bool UnloadProvider([in] string ProviderName);
  257. };
  258. class MSFT_ObjectProviderStatus
  259. {
  260. [key] __Provider ref Provider
  261. BOOL bActive; // Active connection
  262. BOOL bStandby; // No outstanding pointers
  263. uint32 CallsInProgress;
  264. uint32 HostProcessId;
  265. };
  266. class MSFT_ProviderConnection
  267. {
  268. MSFT_ObjectProviderStatus ref Owner;
  269. [values {"Instance", "Property", "Event", "Consumer", "Class"}]
  270. string ActiveProviderTypes[];
  271. };
  272. class MSFT_ProviderSubsystemHostStatus
  273. {
  274. [key] uint32 ProcessId;
  275. [Values {"WmiCore", // Hosted within CIMOM
  276. "SharedLocalSysHost", // In shared local system process
  277. "SharedNetSvcHost", // In shared Network Service process
  278. "SharedPerUserHost", // In shared per-user process
  279. "DedicatedLocalSysHost", // In dedicated local system host
  280. "DedicatedNetSvcHost", // In dedicated network service host
  281. "DedicatedPerUserHost", // In dedicated per-user host
  282. "ClientOnly", // Client in-proc only
  283. "SelfHost", // Separate COM EXE
  284. "Decoupled" //
  285. }
  286. ]
  287. string HostingModel; // NULL when not applicable
  288. __Provider ref LoadedProviders[];
  289. uint32 HostSid[];
  290. };
  291.