EventProviderEnabled function
Determines if the event is enabled for any session.
Syntax
Boolean EventProviderEnabled( _In_ REGHANDLE RegHandle, _In_ UCHAR Level, _In_ ULONGLONG Keyword );
Parameters
- RegHandle [in]
-
Registration handle of the provider. The handle comes from EventRegister.
- Level [in]
-
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.
- Keyword [in]
-
Bitmask that specifies the event category. This mask should be the same keyword mask that you defined in the manifest for the event.
Return value
Returns TRUE if the event is enabled for a session; otherwise, returns FALSE.
Remarks
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.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also