GetTraceEnableFlags function

The GetTraceEnableFlags function retrieves the enable flags passed by the controller to indicate which category of events to trace.

Providers can only call this function from their ControlCallback function.

Syntax


ULONG GetTraceEnableFlags(
  _In_  TRACEHANDLE SessionHandle
);

Parameters

SessionHandle [in]

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

Return value

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:

  • Call the SetLastError function to set the last error to ERROR_SUCCESS.
  • Call the GetTraceEnableFlags function to retrieve the enable flags.
  • If the enable flags value is 0, call the GetLastError function to retrieve the last known error.
  • 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.

Windows Phone 8.1: This API is supported.

Examples

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

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Evntrace.h

Library

Advapi32.lib

DLL

Advapi32.dll

See also

GetTraceEnableLevel
GetTraceLoggerHandle

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.