Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 StartTracingSession2A 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 StartTracingSession2A(
const char* sessionName,
const TRACING_SESSION_OPTIONS_V2* options);
Parameters
sessionName
The name of the tracing session to start, as a narrow string. Use the same name when you call StopTracingSessionA 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.