Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

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.

ValueMeaning
WINEVENT_LEVEL_CRITICAL
1

Abnormal exit or termination events.

WINEVENT_LEVEL_ERROR
2

Severe error events.

WINEVENT_LEVEL_WARNING
3

Warning events such as allocation failures.

WINEVENT_LEVEL_INFO
4

Non-error events such as entry or exit events.

WINEVENT_LEVEL_VERBOSE
5

Detailed trace 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

Evntprov.h

Library

Advapi32.lib

DLL

Advapi32.dll

See also

EventRegister
EVENT_DESCRIPTOR
EventEnabled

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.