EventProviderEnabled function (evntprov.h)
Determines if the event is enabled for any session.
BOOLEAN EVNTAPI EventProviderEnabled( REGHANDLE RegHandle, UCHAR Level, ULONGLONG Keyword );
Registration handle of the provider. The handle comes from EventRegister.
Level of detail included in the event. Specify one of the following levels that are defined in Winmeta.h. Higher numbers imply that you get lower levels as well. For example, if you specify TRACE_LEVEL_WARNING, you also receive all warning, error, and fatal events.
Bitmask that specifies the event category. This mask should be the same keyword mask that you defined in the manifest for the event.
Returns TRUE if the event is enabled for a session; otherwise, returns FALSE.
Typically, providers do not call this function to determine if a session is expecting this event; they simply write the event and ETW determines if the event is logged to the session.
Providers may want to call this function if they need to perform extra work to generate the event. In this case, calling this function first (to determine if a session is expecting this event or not) may save resources and time.
The provider would call this function if the provider did not generate an EVENT_DESCRIPTOR structure for the event from the manifest. If the event descriptor is available, call the EventEnabled function.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|