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.

82 lines
1.5 KiB

  1. // Logical consumer classes.
  2. // =========================
  3. class MyConsumer : __EventConsumer
  4. {
  5. [key] string Name;
  6. };
  7. instance of MyConsumer as $CONS1
  8. {
  9. Name = "Consumer1";
  10. };
  11. instance of MyConsumer as $CONS2
  12. {
  13. Name = "Consumer2";
  14. };
  15. // Provider registration.
  16. // ======================
  17. instance of __Win32Provider as $P
  18. {
  19. Name = "MyEventConsumer";
  20. CLSID = "{4916157B-FBE7-11d1-AEC4-00C04FB68820}";
  21. DefaultMachineName = NULL;
  22. ClientLoadableCLSID = NULL;
  23. ImpersonationLevel = 0;
  24. PerUserInitialization = FALSE;
  25. Pure = TRUE;
  26. UnloadTimeout = NULL;
  27. };
  28. instance of __EventConsumerProviderRegistration
  29. {
  30. Provider = $P;
  31. ConsumerClassNames = { "MyConsumer" };
  32. };
  33. // Two different filter queries one for each consumer.
  34. // ===================================================
  35. instance of __EventFilter as $FILT1
  36. {
  37. Name = "MyConsumer_Filter_A";
  38. Query = "SELECT * FROM MyEvent where Value >= 10";
  39. QueryLanguage = "WQL";
  40. };
  41. instance of __EventFilter as $FILT2
  42. {
  43. Name = "MyConsumer_Filter_B";
  44. Query = "SELECT * FROM MyEvent where Value < 10";
  45. QueryLanguage = "WQL";
  46. };
  47. // Bind the filter to two different logical consumers.
  48. // ===================================================
  49. instance of __FilterToConsumerBinding
  50. {
  51. Consumer = $CONS1;
  52. Filter = $FILT1;
  53. DeliverSynchronously = FALSE;
  54. };
  55. instance of __FilterToConsumerBinding
  56. {
  57. Consumer = $CONS2;
  58. Filter = $FILT2;
  59. DeliverSynchronously = FALSE;
  60. };