EventEnabled function
Determines if the event is enabled for any session.
Syntax
Boolean EventEnabled( _In_ REGHANDLE RegHandle, _In_ PCEVENT_DESCRIPTOR EventDescriptor );
Parameters
- RegHandle [in]
-
Registration handle of the provider. The handle comes from EventRegister.
Note A valid registration handle must be used. - EventDescriptor [in]
-
Describes the event. For details, see EVENT_DESCRIPTOR.
Return value
Returns TRUE if the event is enabled for a session; otherwise, 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. 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 generated an EVENT_DESCRIPTOR structure for the event from the manifest. If the event descriptor is not available, call the EventProviderEnabled function.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also