Skip to content

Latest commit

 

History

History
121 lines (103 loc) · 3.66 KB

nf-evntrace-gettraceenableflags.md

File metadata and controls

121 lines (103 loc) · 3.66 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:evntrace.GetTraceEnableFlags
GetTraceEnableFlags function (evntrace.h)
A RegisterTraceGuids-based ("Classic") event provider uses the GetTraceEnableFlags function to retrieve the enable flags specified by the trace controller to indicate which category of events to trace. Providers call this function from their ControlCallback function.
GetTraceEnableFlags
GetTraceEnableFlags function [ETW]
_evt_gettraceenableflags
base.gettraceenableflags
etw.gettraceenableflags
evntrace/GetTraceEnableFlags
etw\gettraceenableflags.htm
ETW
e5c0f2bf-34da-4555-9556-4c79ee9a73ab
12/05/2018
GetTraceEnableFlags, GetTraceEnableFlags function [ETW], _evt_gettraceenableflags, base.gettraceenableflags, etw.gettraceenableflags, evntrace/GetTraceEnableFlags
evntrace.h
Windows
Windows 2000 Professional [desktop apps \| UWP apps]
Windows 2000 Server [desktop apps \| UWP apps]
Advapi32.lib
Advapi32.dll
Windows
19H1
GetTraceEnableFlags
evntrace/GetTraceEnableFlags
c++
APIRef
kbSyntax
DllExport
Advapi32.dll
API-MS-Win-DownLevel-AdvApi32-l1-1-0.dll
KernelBase.dll
API-MS-Win-DownLevel-AdvApi32-l1-1-1.dll
API-MS-Win-eventing-classicprovider-l1-1-0.dll
GetTraceEnableFlags

GetTraceEnableFlags function

-description

A RegisterTraceGuids-based ("Classic") event provider uses the GetTraceEnableFlags function to retrieve the enable flags specified by the trace controller to indicate which category of events to trace.

Providers call this function from their ControlCallback function.

-parameters

-param TraceHandle [in]

Handle to an event tracing session, obtained by calling the GetTraceLoggerHandle function.

-returns

Returns the value the controller specified in the EnableFlag parameter when calling the EnableTrace function.

To determine if the function failed or the controller set the enable flags to 0, follow these steps:

  1. Call the SetLastError function to set the last error to ERROR_SUCCESS.
  2. Call the GetTraceEnableFlags function to retrieve the enable flags.
  3. If the enable flags value is 0, call the GetLastError function to retrieve the last known error.
  4. If the last known error is ERROR_SUCCESS, the controller set the enable flags to 0; otherwise, the GetTraceEnableFlags function failed with the last known error.

-remarks

Providers can use this value to control which events that it generates. For example, a provider can group events into logical categories of events and use this value to enable or disable their generation.

Examples

For an example that uses GetTraceEnableFlags, see Retrieving Event Data Using MOF.

-see-also

GetTraceEnableLevel

GetTraceLoggerHandle