StopAndRelogTracingSessionA

The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To see the documentation for these versions, set the Visual Studio Version selector control for this article to Visual Studio 2017 or later. It's found at the top of the table of contents on this page.

The StopAndRelogTracingSessionA function stops an ongoing tracing session and saves the resulting trace in a temporary file. A relogging session is then immediately started using the temporary file as an input. The final relogged trace produced by the relogging session is saved in a file specified by the caller. Executables calling this function must have administrator privileges.

Syntax

enum RESULT_CODE StopAndRelogTracingSessionA(
    const char*                 sessionName,
    const char*                 outputLogFile,
    TRACING_SESSION_STATISTICS* statistics,
    const RELOG_DESCRIPTOR*     relogDescriptor);

Parameters

sessionName
The name of the tracing session to stop. Use the same session name as the one passed to StartTracingSession, StartTracingSessionA, or StartTracingSessionW.

outputLogFile
The file in which to write the relogged trace produced by the relogging session.

statistics
Pointer to a TRACING_SESSION_STATISTICS object. StopAndRelogTracingSessionA writes trace collection statistics in this object before returning.

analysisDescriptor
Pointer to a RELOG_DESCRIPTOR object. Use this object to configure the relogging session that's started by StopAndRelogTracingSessionA.

Return Value

A result code from the RESULT_CODE enum.