#ifndef _NTWMI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
NTSYSAPI
BOOLEAN
NTAPI
EtwEventEnabled(
_In_ REGHANDLE RegHandle,
_In_ PCEVENT_DESCRIPTOR EventDescriptor
);
View code on GitHub// wdm.h
BOOLEAN EtwEventEnabled(
[in] REGHANDLE RegHandle,
[in] PCEVENT_DESCRIPTOR EventDescriptor
);
View the official Windows Driver Kit DDI referenceThis function is documented in Windows Driver Kit.
The EtwEventEnabled function verifies whether an event is enabled.
RegHandle [in]A pointer to the event provider registration handle, which is returned by the EtwRegister function if the event provider registration is successful.
EventDescriptor [in]A pointer to a constant EVENT_DESCRIPTOR.
The EtwEventEnabled function returns TRUE if the event is enabled and FALSE if the event is not enabled.
If logging an event requires additional computing, the EtwEventEnabled function can be used to determine whether the event is going to be logged, which will minimize the overhead when logging is disabled.
If the event descriptor is not available, use the EtwProviderEnabled function instead.