File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -145,26 +145,26 @@ VOID EtStartEtwSession(
145
145
if (EtWindowsVersion >= WINDOWS_8 )
146
146
EtpTraceProperties -> LogFileMode |= EVENT_TRACE_SYSTEM_LOGGER_MODE ;
147
147
148
- status = StartTrace (
149
- & traceHandle ,
148
+ // Get the existing session handle.
149
+ status = ControlTrace (
150
+ 0 ,
150
151
EtpActualKernelLoggerName -> Buffer ,
151
- EtpTraceProperties
152
+ EtpTraceProperties ,
153
+ EVENT_TRACE_CONTROL_QUERY
152
154
);
153
155
154
- if (status == ERROR_ALREADY_EXISTS )
156
+ if (status == ERROR_SUCCESS )
155
157
{
156
- // Get the existing session handle.
157
- status = ControlTrace (
158
- 0 ,
158
+ traceHandle = EtpTraceProperties -> Wnode .HistoricalContext ;
159
+ }
160
+ else
161
+ {
162
+ EtpTraceProperties -> LogFileNameOffset = 0 ;
163
+ status = StartTrace (
164
+ & traceHandle ,
159
165
EtpActualKernelLoggerName -> Buffer ,
160
- EtpTraceProperties ,
161
- EVENT_TRACE_CONTROL_QUERY
166
+ EtpTraceProperties
162
167
);
163
-
164
- if (status == ERROR_SUCCESS )
165
- {
166
- traceHandle = EtpTraceProperties -> Wnode .HistoricalContext ;
167
- }
168
168
}
169
169
170
170
// Enable stack tracing.
You can’t perform that action at this time.
0 commit comments