Partager via


CreateMergedTraceFile

This function merges multiple trace files into a single output file.

ULONG
WINAPI
CreateMergedTraceFile(
__in LPCWSTR wszMergedFileName,
__in LPCWSTR wszTraceFileNames[],
__in ULONG cTraceFileNames,
__in DWORD dwExtendedDataFlags
);

Parameters

  • wszMergedFileName [in]
    Specifies the name of the output trace file.
  • wszTraceFileNames [in]
    Pointer to an array of trace files to be merged.
  • cTraceFileNames [in]
    Count of the elements in the wszTraceFileNames array.
  • dwExtendedDataFlags [in]
    These flags specify the system information to be injected into the merged trace file. For more information about valid flags, see Custom Injection of System Information.

Return Value

ERROR_SUCCESS indicates success.

Possible error values are described in the following table.

Error Value Description

ERROR_INSUFFICIENT_BUFFER

Possibly indicates that the merged trace does not contain a complete set of events from each file.

ERROR_REVISION_MISMATCH

Possibly indicates that the trace files being merged contain events with different versions that could not be merged.

If neither of these error values is returned, a system error code is returned.

Remarks

You can merge two or more trace files from simultaneous sessions that were captured on the same computer into a single trace file. You can also merge trace files from other tracing sessions if those files have the same boot times. Optionally, the merge operation adds metadata concerning the traces.

This function can inject extended data into a single trace file. In this case the wszMergedFileName array contains only a single element, which is the name of the trace file.

Note

An unmerged kernel trace cannot decode symbols correctly.

The API is implemented in Unicode only.

Requirements

  • Versions: Available beginning in Windows Vista®. This structure is distributed with Windows Performance Analyzer.

  • Headers: Declared in KernelTraceControl.h. Include KernelTraceControl.h.

  • Library: Contained in KernelTraceControl.dll.

See Also

Reference

Custom Injection of System Information

Other Resources

Functions