Szerkesztés

Megosztás a következőn keresztül:


Retrieving Additional Event Tracing Data

Once you have begun an event tracing session, you can use TraceSetInformation to instruct the system to return additional event tracing data. The additional information will be placed in the extended data section of the relevant event trace.

The following procedure describes how to use the TraceSetInformation function to retrieve additional data from an event tracing session.

To retrieve additional event tracing data

  1. Start your session with a call to StartTrace.

    For more information, see Configuring and Starting an Event Tracing Session.

  2. Call TraceSetInformation to set additional event tracing data.

    use the EVENT_INFO_CLASS enumeration in the ClassInformation parameter to describe the additional information you wish to retrieve. The following example describes how to call TraceSetInformation, using the session handle returned from the call to StartTrace, and the TraceProviderBinaryTracking value from EVENT_INFO_CLASS.

    BOOLEAN enabled = TRUE;
    Win32Error error = TraceSetInformation(
        m_sessionHandle,
        TraceProviderBinaryTracking,
        &enabled,
        sizeof(enabled));
    
  3. Alternately, you can use TraceQueryInformation to retrieve information about the current event tracing session settings.

    Like TraceSetInformation, TraceQueryInformation uses the EVENT_INFO_CLASS enumeration to describe what information to retrieve from the system.