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

// Logical consumer classes.
// =========================
class MyConsumer : __EventConsumer
{
[key] string Name;
};
instance of MyConsumer as $CONS1
{
Name = "Consumer1";
};
instance of MyConsumer as $CONS2
{
Name = "Consumer2";
};
// Provider registration.
// ======================
instance of __Win32Provider as $P
{
Name = "MyEventConsumer";
CLSID = "{4916157B-FBE7-11d1-AEC4-00C04FB68820}";
DefaultMachineName = NULL;
ClientLoadableCLSID = NULL;
ImpersonationLevel = 0;
PerUserInitialization = FALSE;
Pure = TRUE;
UnloadTimeout = NULL;
};
instance of __EventConsumerProviderRegistration
{
Provider = $P;
ConsumerClassNames = { "MyConsumer" };
};
// Two different filter queries one for each consumer.
// ===================================================
instance of __EventFilter as $FILT1
{
Name = "MyConsumer_Filter_A";
Query = "SELECT * FROM MyEvent where Value >= 10";
QueryLanguage = "WQL";
};
instance of __EventFilter as $FILT2
{
Name = "MyConsumer_Filter_B";
Query = "SELECT * FROM MyEvent where Value < 10";
QueryLanguage = "WQL";
};
// Bind the filter to two different logical consumers.
// ===================================================
instance of __FilterToConsumerBinding
{
Consumer = $CONS1;
Filter = $FILT1;
DeliverSynchronously = FALSE;
};
instance of __FilterToConsumerBinding
{
Consumer = $CONS2;
Filter = $FILT2;
DeliverSynchronously = FALSE;
};