TraceLoggingFunction macro (traceloggingactivity.h)

Creates a TraceLoggingThreadActivity named after the current function and writes a Start event for the activity. A Stop activity will be written at the end of the current scope.

Syntax

void TraceLoggingFunction(
  [in]  providerHandle,
        __VA_ARGS__
);

Parameters

[in] providerHandle

A provider registration handle.

__VA_ARGS__

Return value

None

Remarks

Invoke this macro at the beginning of a function to define an activity. This macro will then automatically create a TraceLoggingThreadActivity object based on the name of the function, and start logging for the activity. It will also automatically generate and log a stop event when the function completes.

TraceLoggingThreadActivity object, you must ensure that no child activity will outlast the associated function, even in error cases or edge cases.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2012 R2
Target Platform Windows
Header traceloggingactivity.h