| 378 | } |
| 379 | |
| 380 | void MockPresentMonSession::Consume(TRACEHANDLE traceHandle) { |
| 381 | SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); |
| 382 | |
| 383 | // You must call OpenTrace() prior to calling this function |
| 384 | // |
| 385 | // ProcessTrace() blocks the calling thread until it |
| 386 | // 1) delivers all events in a trace log file, or |
| 387 | // 2) the BufferCallback function returns FALSE, or |
| 388 | // 3) you call CloseTrace(), or |
| 389 | // 4) the controller stops the trace session. |
| 390 | // |
| 391 | // There may be a several second delay before the function returns. |
| 392 | // |
| 393 | // ProcessTrace() is supposed to return ERROR_CANCELLED if BufferCallback |
| 394 | // (EtwThreadShouldQuit) returns FALSE; and ERROR_SUCCESS if the trace |
| 395 | // completes (parse the entire ETL, fills the maximum file size, or is |
| 396 | // explicitly closed). |
| 397 | // |
| 398 | // However, it seems to always return ERROR_SUCCESS. |
| 399 | |
| 400 | ProcessTrace(&traceHandle, 1, NULL, NULL); |
| 401 | |
| 402 | // consider setting nsm header flag here to indicate end of playback without destroying nsm/trace session |
| 403 | } |
| 404 | |
| 405 | void MockPresentMonSession::Output() { |
| 406 | // Structures to track processes and statistics from recorded events. |
nothing calls this directly
no outgoing calls
no test coverage detected