Source code of Windows XP (NT5)
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.

710 lines
15 KiB

  1. // � 2000 Microsoft Corporation. All rights reserved.
  2. #pragma namespace ("\\\\.\\root\\cimv2")
  3. /////////////////////////////////////////////////////////////////////////////
  4. // Base classes for SCM events
  5. class MSFT_SCMEvent : __ExtrinsicEvent
  6. {
  7. };
  8. // Base class for events destined for the system Event Log.
  9. class MSFT_SCMEventLogEvent : MSFT_SCMEvent
  10. {
  11. };
  12. /////////////////////////////////////////////////////////////////////////////
  13. // Net events
  14. //
  15. // MessageId: EVENT_BAD_ACCOUNT_NAME
  16. //
  17. // MessageText:
  18. //
  19. // No backslash is in the account name.
  20. //
  21. [
  22. EventId(0xC0001B60) : ToInstance,
  23. EventType(1) : ToInstance
  24. ]
  25. class MSFT_NetBadAccount : MSFT_SCMEventLogEvent
  26. {
  27. };
  28. //
  29. // MessageId: EVENT_CALL_TO_FUNCTION_FAILED
  30. //
  31. // MessageText:
  32. //
  33. // The %1 call failed with the following error: %n%2
  34. //
  35. [
  36. EventId(0xC0001B5D) : ToInstance,
  37. EventType(1) : ToInstance,
  38. InsertionStringTemplates {"%FunctionName%", "%%%%%Error%"} : ToInstance
  39. ]
  40. class MSFT_NetCallToFunctionFailed : MSFT_SCMEventLogEvent
  41. {
  42. string FunctionName;
  43. uint32 Error;
  44. };
  45. //
  46. // MessageId: EVENT_CALL_TO_FUNCTION_FAILED_II
  47. //
  48. // MessageText:
  49. //
  50. // The %1 call failed for %2 with the following error: %n%3
  51. //
  52. [
  53. EventId(0xC0001B5E) : ToInstance,
  54. EventType(1) : ToInstance,
  55. InsertionStringTemplates {"%FunctionName%", "%Argument%", "%%%%%Error%"} : ToInstance
  56. ]
  57. class MSFT_NetCallToFunctionFailedII : MSFT_SCMEventLogEvent
  58. {
  59. string FunctionName;
  60. string Argument;
  61. uint32 Error;
  62. };
  63. //
  64. // MessageId: EVENT_FIRST_LOGON_FAILED
  65. //
  66. // MessageText:
  67. //
  68. // Logon attempt with current password failed with the following error: %n%1
  69. //
  70. [
  71. EventId(0xC0001B65) : ToInstance,
  72. EventType(1) : ToInstance,
  73. InsertionStringTemplates {"%%%%%Error%"} : ToInstance
  74. ]
  75. class MSFT_NetFirstLogonFailed : MSFT_SCMEventLogEvent
  76. {
  77. uint32 Error;
  78. };
  79. //
  80. // MessageId: EVENT_REVERTED_TO_LASTKNOWNGOOD
  81. //
  82. // MessageText:
  83. //
  84. // The system reverted to its last known good configuration. The system is restarting....
  85. //
  86. [
  87. EventId(0xC0001B5F) : ToInstance,
  88. EventType(1) : ToInstance
  89. ]
  90. class MSFT_NetRevertedToLastKnownGood : MSFT_SCMEventLogEvent
  91. {
  92. };
  93. //
  94. // MessageId: EVENT_CONNECTION_TIMEOUT
  95. //
  96. // MessageText:
  97. //
  98. // Timeout (%1 milliseconds) waiting for the %2 service to connect.
  99. //
  100. [
  101. EventId(0xC0001B61) : ToInstance,
  102. EventType(1) : ToInstance,
  103. InsertionStringTemplates {"%Milliseconds%", "%Service%"} : ToInstance
  104. ]
  105. class MSFT_NetConnectionTimeout : MSFT_SCMEventLogEvent
  106. {
  107. uint32 Milliseconds;
  108. string Service;
  109. };
  110. //
  111. // MessageId: EVENT_READFILE_TIMEOUT
  112. //
  113. // MessageText:
  114. //
  115. // Timeout (%1 milliseconds) waiting for ReadFile.
  116. //
  117. [
  118. EventId(0xC0001B62) : ToInstance,
  119. EventType(1) : ToInstance,
  120. InsertionStringTemplates {"%Milliseconds%"} : ToInstance
  121. ]
  122. class MSFT_NetReadfileTimeout : MSFT_SCMEventLogEvent
  123. {
  124. uint32 Milliseconds;
  125. };
  126. //
  127. // MessageId: EVENT_TRANSACT_TIMEOUT
  128. //
  129. // MessageText:
  130. //
  131. // Timeout (%1 milliseconds) waiting for a transaction response from the %2 service.
  132. //
  133. [
  134. EventId(0xC0001B63) : ToInstance,
  135. EventType(1) : ToInstance,
  136. InsertionStringTemplates {"%Milliseconds%", "%Service%"} : ToInstance
  137. ]
  138. class MSFT_NetTransactTimeout : MSFT_SCMEventLogEvent
  139. {
  140. uint32 Milliseconds;
  141. string Service;
  142. };
  143. //
  144. // MessageId: EVENT_TRANSACT_INVALID
  145. //
  146. // MessageText:
  147. //
  148. // Message returned in transaction has incorrect size.
  149. //
  150. [
  151. EventId(0xC0001B64) : ToInstance,
  152. EventType(1) : ToInstance
  153. ]
  154. class MSFT_NetTransactInvalid : MSFT_SCMEventLogEvent
  155. {
  156. };
  157. //
  158. // Parameter %4 is the value, in decimal, of the SC_ACTION_ constant for
  159. // the action described in parameter %5.
  160. //
  161. //
  162. // MessageId: EVENT_SERVICE_CRASH
  163. //
  164. // MessageText:
  165. //
  166. // The %1 service terminated unexpectedly. It has done this %2 time(s). The following corrective action will be taken in %3 milliseconds: %5.
  167. //
  168. [
  169. EventId(0xC0001B77) : ToInstance,
  170. EventType(1) : ToInstance,
  171. InsertionStringTemplates {"%Service%", "%TimesFailed%", "%ActionDelay%", "%ActionType%", "%Action%"} : ToInstance
  172. ]
  173. class MSFT_NetServiceCrash : MSFT_SCMEventLogEvent
  174. {
  175. string Service;
  176. uint32 TimesFailed;
  177. uint32 ActionDelay;
  178. uint32 ActionType;
  179. string Action;
  180. };
  181. //
  182. // MessageId: EVENT_SERVICE_CRASH_NO_ACTION
  183. //
  184. // MessageText:
  185. //
  186. // The %1 service terminated unexpectedly. It has done this %2 time(s).
  187. //
  188. [
  189. EventId(0xC0001B7A) : ToInstance,
  190. EventType(1) : ToInstance,
  191. InsertionStringTemplates {"%Service%", "%TimesFailed%" } : ToInstance
  192. ]
  193. class MSFT_NetServiceCrashNoAction : MSFT_SCMEventLogEvent
  194. {
  195. string Service;
  196. uint32 TimesFailed;
  197. };
  198. //
  199. // MessageId: EVENT_SERVICE_NOT_INTERACTIVE
  200. //
  201. // MessageText:
  202. //
  203. // The %1 service is marked as an interactive service. However, the system is configured to not allow interactive services. This service may not function properly.
  204. //
  205. [
  206. EventId(0xC0001B76) : ToInstance,
  207. EventType(1) : ToInstance,
  208. InsertionStringTemplates {"%Service%"} : ToInstance
  209. ]
  210. class MSFT_NetServiceNotInteractive : MSFT_SCMEventLogEvent
  211. {
  212. string Service;
  213. };
  214. //
  215. // Parameter %1 is the value, in decimal, of the SC_ACTION_ constant for
  216. // the action described in parameter %2.
  217. //
  218. //
  219. // MessageId: EVENT_SERVICE_RECOVERY_FAILED
  220. //
  221. // MessageText:
  222. //
  223. // The Service Control Manager tried to take a corrective action (%2) after the unexpected termination of the %3 service, but this action failed with the following error: %n%4
  224. //
  225. [
  226. EventId(0xC0001B78) : ToInstance,
  227. EventType(1) : ToInstance,
  228. InsertionStringTemplates {"%ActionType%", "%Action%", "%Service%", "%%%%%Error%"} : ToInstance
  229. ]
  230. class MSFT_NetServiceRecoveryFailed : MSFT_SCMEventLogEvent
  231. {
  232. uint32 ActionType;
  233. string Action;
  234. string Service;
  235. uint32 Error;
  236. };
  237. //
  238. // MessageId: EVENT_INVALID_DRIVER_DEPENDENCY
  239. //
  240. // MessageText:
  241. //
  242. // Boot-start or system-start driver (%1) must not depend on a service.
  243. //
  244. [
  245. EventId(0xC0001B67) : ToInstance,
  246. EventType(1) : ToInstance,
  247. InsertionStringTemplates {"%Driver%"} : ToInstance
  248. ]
  249. class MSFT_NetInvalidDriverDependency : MSFT_SCMEventLogEvent
  250. {
  251. string Driver;
  252. };
  253. //
  254. // MessageId: EVENT_SERVICE_START_FAILED
  255. //
  256. // MessageText:
  257. //
  258. // The %1 service failed to start due to the following error: %n%2
  259. //
  260. [
  261. EventId(0xC0001B58) : ToInstance,
  262. EventType(1) : ToInstance,
  263. InsertionStringTemplates {"%Service%", "%%%%%Error%"} : ToInstance
  264. ]
  265. class MSFT_NetServiceStartFailed : MSFT_SCMEventLogEvent
  266. {
  267. string Service;
  268. uint32 Error;
  269. };
  270. //
  271. // MessageId: EVENT_SERVICE_START_FAILED_II
  272. //
  273. // MessageText:
  274. //
  275. // The %1 service depends on the %2 service which failed to start because
  276. // of the following error: %n%3
  277. //
  278. [
  279. EventId(0xC0001B59) : ToInstance,
  280. EventType(1) : ToInstance,
  281. InsertionStringTemplates {"%Service%", "%DependedOnService%", "%%%%%Error%"} : ToInstance
  282. ]
  283. class MSFT_NetServiceStartFailedII : MSFT_SCMEventLogEvent
  284. {
  285. string Service;
  286. string DependedOnService;
  287. uint32 Error;
  288. };
  289. //
  290. // MessageId: EVENT_CIRCULAR_DEPENDENCY_DEMAND
  291. //
  292. // MessageText:
  293. //
  294. // Detected circular dependencies demand starting %1.
  295. //
  296. [
  297. EventId(0xC0001B69) : ToInstance,
  298. EventType(1) : ToInstance,
  299. InsertionStringTemplates {"%Service%"} : ToInstance
  300. ]
  301. class MSFT_NetCircularDependencyDemand : MSFT_SCMEventLogEvent
  302. {
  303. string Service;
  304. };
  305. //
  306. // MessageId: EVENT_CIRCULAR_DEPENDENCY_AUTO
  307. //
  308. // MessageText:
  309. //
  310. // Detected circular dependencies auto-starting services.
  311. //
  312. [
  313. EventId(0xC0001B6A) : ToInstance,
  314. EventType(1) : ToInstance
  315. ]
  316. class MSFT_NetCircularDependencyAuto : MSFT_SCMEventLogEvent
  317. {
  318. };
  319. //
  320. // MessageId: EVENT_SERVICE_START_FAILED_NONE
  321. //
  322. // MessageText:
  323. //
  324. // The %1 service depends on the following nonexistent service: %2
  325. //
  326. [
  327. EventId(0xC0001B5B) : ToInstance,
  328. EventType(1) : ToInstance,
  329. InsertionStringTemplates {"%Service%", "%NonExistingService%"} : ToInstance
  330. ]
  331. class MSFT_NetServiceStartFailedNone : MSFT_SCMEventLogEvent
  332. {
  333. string Service;
  334. string NonExistingService;
  335. };
  336. //
  337. // MessageId: EVENT_DEPEND_ON_LATER_SERVICE
  338. //
  339. // MessageText:
  340. //
  341. // Circular dependency: The %1 service depends on a service in a group which starts later.
  342. //
  343. [
  344. EventId(0xC0001B6B) : ToInstance,
  345. EventType(1) : ToInstance,
  346. InsertionStringTemplates {"%Service%"} : ToInstance
  347. ]
  348. class MSFT_NetDependOnLaterService : MSFT_SCMEventLogEvent
  349. {
  350. string Service;
  351. };
  352. //
  353. // MessageId: EVENT_SERVICE_START_FAILED_GROUP
  354. //
  355. // MessageText:
  356. //
  357. // The %1 service depends on the %2 group and no member of this group started.
  358. //
  359. [
  360. EventId(0xC0001B5A) : ToInstance,
  361. EventType(1) : ToInstance,
  362. InsertionStringTemplates {"%Service%", "%Group%"} : ToInstance
  363. ]
  364. class MSFT_NetServiceStartFailedGroup : MSFT_SCMEventLogEvent
  365. {
  366. string Service;
  367. string Group;
  368. };
  369. //
  370. // MessageId: EVENT_DEPEND_ON_LATER_SERVICE
  371. //
  372. // MessageText:
  373. //
  374. // Circular dependency: The %1 service depends on a service in a group which starts later.
  375. //
  376. [
  377. EventId(0xC0001B6B) : ToInstance,
  378. EventType(1) : ToInstance,
  379. InsertionStringTemplates {"%Service%"} : ToInstance
  380. ]
  381. class MSFT_NetDependOnLaterGroup : MSFT_SCMEventLogEvent
  382. {
  383. string Service;
  384. };
  385. //
  386. // MessageId: EVENT_SERVICE_START_HUNG
  387. //
  388. // MessageText:
  389. //
  390. // The %1 service hung on starting.
  391. //
  392. [
  393. EventId(0xC0001B6E) : ToInstance,
  394. EventType(1) : ToInstance,
  395. InsertionStringTemplates {"%Service%"} : ToInstance
  396. ]
  397. class MSFT_NetServiceStartHung : MSFT_SCMEventLogEvent
  398. {
  399. string Service;
  400. };
  401. //
  402. // MessageId: EVENT_SEVERE_SERVICE_FAILED
  403. //
  404. // MessageText:
  405. //
  406. // About to revert to the last known good configuration because the %1 service failed to start.
  407. //
  408. [
  409. EventId(0xC0001B6D) : ToInstance,
  410. EventType(1) : ToInstance,
  411. InsertionStringTemplates {"%Service%"} : ToInstance
  412. ]
  413. class MSFT_NetSevereServiceFailed : MSFT_SCMEventLogEvent
  414. {
  415. string Service;
  416. };
  417. //
  418. // MessageId: EVENT_TAKE_OWNERSHIP
  419. //
  420. // MessageText:
  421. //
  422. // The %1 Registry key denied access to SYSTEM account programs so the Service Control Manager took ownership of the Registry key.
  423. //
  424. [
  425. EventId(0xC0001B74) : ToInstance,
  426. EventType(1) : ToInstance,
  427. InsertionStringTemplates {"%RegistryKey%"} : ToInstance
  428. ]
  429. class MSFT_NetTakeOwnership : MSFT_SCMEventLogEvent
  430. {
  431. string RegistryKey;
  432. };
  433. //
  434. // MessageId: EVENT_BAD_SERVICE_STATE
  435. //
  436. // MessageText:
  437. //
  438. // The %1 service has reported an invalid current state %2.
  439. //
  440. [
  441. EventId(0xC0001B68) : ToInstance,
  442. EventType(1) : ToInstance,
  443. InsertionStringTemplates {"%Service%", "%State%"} : ToInstance
  444. ]
  445. class MSFT_NetBadServiceState : MSFT_SCMEventLogEvent
  446. {
  447. string Service;
  448. uint32 State;
  449. };
  450. //
  451. // MessageId: EVENT_SERVICE_EXIT_FAILED
  452. //
  453. // MessageText:
  454. //
  455. // The %1 service terminated with the following error: %n%2
  456. //
  457. [
  458. EventId(0xC0001B6F) : ToInstance,
  459. EventType(1) : ToInstance,
  460. InsertionStringTemplates {"%Service%", "%%%%%Error%"} : ToInstance
  461. ]
  462. class MSFT_NetServiceExitFailed : MSFT_SCMEventLogEvent
  463. {
  464. string Service;
  465. uint32 Error;
  466. };
  467. //
  468. // MessageId: EVENT_SERVICE_EXIT_FAILED_SPECIFIC
  469. //
  470. // MessageText:
  471. //
  472. // The %1 service terminated with service-specific error %2.
  473. //
  474. [
  475. EventId(0xC0001B70) : ToInstance,
  476. EventType(1) : ToInstance,
  477. InsertionStringTemplates {"%Service%", "%Error% (%Error(0x%X)%)"} : ToInstance
  478. ]
  479. class MSFT_NetServiceExitFailedSpecific : MSFT_SCMEventLogEvent
  480. {
  481. string Service;
  482. uint32 Error;
  483. };
  484. //
  485. // MessageId: EVENT_BOOT_SYSTEM_DRIVERS_FAILED
  486. //
  487. // MessageText:
  488. //
  489. // The following boot-start or system-start driver(s) failed to load: %1
  490. //
  491. [
  492. EventId(0xC0001B72) : ToInstance,
  493. EventType(1) : ToInstance,
  494. InsertionStringTemplates {"%DriverList%"} : ToInstance
  495. ]
  496. class MSFT_NetBootSystemDriversFailed : MSFT_SCMEventLogEvent
  497. {
  498. string DriverList;
  499. };
  500. //
  501. // MessageId: EVENT_SERVICE_CONTROL_SUCCESS
  502. //
  503. // MessageText:
  504. //
  505. // The %1 service was successfully sent a %2 control.
  506. //
  507. [
  508. EventId(0x40001B7B) : ToInstance,
  509. EventType(4) : ToInstance,
  510. InsertionStringTemplates {"%Service%", "%Control%"} : ToInstance
  511. ]
  512. class MSFT_NetServiceControlSuccess : MSFT_SCMEventLogEvent
  513. {
  514. string Service;
  515. string Control;
  516. string sid;
  517. };
  518. //
  519. // MessageId: EVENT_SERVICE_STATUS_SUCCESS
  520. //
  521. // MessageText:
  522. //
  523. // The %1 service entered the %2 state.
  524. //
  525. [
  526. EventId(0x40001B7C) : ToInstance,
  527. EventType(4) : ToInstance,
  528. InsertionStringTemplates {"%Service%", "%Control%"} : ToInstance
  529. ]
  530. class MSFT_NetServiceStatusSuccess : MSFT_SCMEventLogEvent
  531. {
  532. string Service;
  533. string Control;
  534. };
  535. //
  536. // MessageId: EVENT_SERVICE_CONFIG_BACKOUT_FAILED
  537. //
  538. // MessageText:
  539. //
  540. // The Service Control Manager encountered an error undoing a change to the
  541. // %1 for the %2 service after a failed attempt to update the service's
  542. // configuration information, leaving the service's configuration information
  543. // in an unpredictable state. Use the Services MMC snap-in to make sure
  544. // the service is configured as expected.
  545. //
  546. [
  547. EventId(0xC0001B7D) : ToInstance,
  548. EventType(1) : ToInstance,
  549. InsertionStringTemplates {"%Service%", "%ConfigField%"} : ToInstance
  550. ]
  551. class MSFT_NetServiceConfigBackoutFailed : MSFT_SCMEventLogEvent
  552. {
  553. string Service;
  554. string ConfigField;
  555. };
  556. //
  557. // MessageId: EVENT_FIRST_LOGON_FAILED_II
  558. //
  559. // MessageText:
  560. //
  561. // The %1 service was unable to log on as %2 with the currently configured
  562. // password due to the following error: %n%3. To ensure that the service is
  563. // configured properly, use the Services snap-in in Microsoft Management
  564. // Console (MMC).
  565. //
  566. [
  567. EventId(0xC0001B7E) : ToInstance,
  568. EventType(1) : ToInstance,
  569. InsertionStringTemplates {"%Service%", "%Account%", "%%%%%Error%"} : ToInstance
  570. ]
  571. class MSFT_NetFirstLogonFailedII : MSFT_SCMEventLogEvent
  572. {
  573. string Service;
  574. string Account;
  575. uint32 Error;
  576. };
  577. /////////////////////////////////////////////////////////////////////////////
  578. // SCM Event Provider registration.
  579. #pragma DeleteInstance("MSFT_WMI_NonCOMEventProvider.Name=\"SCM Event Provider\"", NOFAIL)
  580. instance of __Win32Provider as $P1
  581. {
  582. Name = "SCM Event Provider";
  583. HostingModel = "Decoupled:NonCOM";
  584. };
  585. instance of __EventProviderRegistration
  586. {
  587. Provider = $P1;
  588. EventQueryList =
  589. {
  590. "select * from MSFT_SCMEvent"
  591. };
  592. };
  593. /////////////////////////////////////////////////////////////////////////////
  594. // SCM Event Log consumer registration
  595. //
  596. // clean up any old subscriptions in root\cimv2 ( left by whistler beta1 )
  597. //
  598. #pragma deleteinstance("__FilterToConsumerBinding.Consumer=\"NTEventLogEventConsumer.Name=\\\"SCM Event Log Consumer\\\"\",Filter=\"__EventFilter.Name=\\\"SCM Event Log Filter\\\"\"", NOFAIL )
  599. #pragma deleteinstance("__EventFilter.Name=\"SCM Event Log Filter\"", NOFAIL )
  600. #pragma namespace ("\\\\.\\root\\subscription")
  601. instance of NTEventLogEventConsumer
  602. {
  603. Name = "SCM Event Log Consumer";
  604. SourceName = "Service Control Manager";
  605. EventType = 1;
  606. Category = 0;
  607. NameOfUserSIDProperty = "sid";
  608. };
  609. /////////////////////////////////////////////////////////////////////////////
  610. // SCM Event Log filter
  611. instance of __EventFilter
  612. {
  613. Name = "SCM Event Log Filter";
  614. QueryLanguage = "WQL";
  615. Query = "select * from MSFT_SCMEventLogEvent";
  616. EventNamespace = "root\\cimv2";
  617. };
  618. /////////////////////////////////////////////////////////////////////////////
  619. // SCM Event Log filter-to-consumer binding
  620. instance of __FilterToConsumerBinding
  621. {
  622. Consumer = "NTEventLogEventConsumer.Name=\"SCM Event Log Consumer\"";
  623. Filter = "__EventFilter.Name=\"SCM Event Log Filter\"";
  624. };