Edit

StartTracingSession2W

The C++ Build Insights SDK works 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.

The StartTracingSession2W C function starts a tracing session with configurable Event Tracing for Windows (ETW) enable properties. It requires version 1.6.0 or later of the Microsoft.Cpp.BuildInsights NuGet package. Executables that call this function must have administrator privileges.

Syntax

enum RESULT_CODE StartTracingSession2W(
    const wchar_t*                    sessionName,
    const TRACING_SESSION_OPTIONS_V2* options);

Parameters

sessionName
The name of the tracing session to start, as a wide string. Use the same name when you call StopTracingSessionW or another stop function.

options
A pointer to a TRACING_SESSION_OPTIONS_V2 structure object. Use it to select events and set enable-property flags for the MSVC provider.

Return value

A result code from the RESULT_CODE enum enum.