ProcessTraceAddBufferToBufferStream function (evntrace.h)

Provides an ETW trace buffer to a processing session created by OpenTraceFromBufferStream.

Syntax

ETW_APP_DECLSPEC_DEPRECATED ULONG WMIAPI ProcessTraceAddBufferToBufferStream(
  TRACEHANDLE             TraceHandle,
  const ETW_BUFFER_HEADER *Buffer,
  ULONG                   BufferSize
);

Parameters

TraceHandle

The TRACEHANDLE for the processing session to add to.

Buffer

A valid ETW buffer to process.

BufferSize

The ETW buffer size.

Return value

ERROR_SUCCESS or a Win32 error code to indicate that the buffer is invalid, out of time order, or that the TraceHandle is invalid.

Remarks

Buffers passed by ProcessTraceAddBufferToBufferStream must be in the same order as they were produced by ProcessTrace. Incorrect ordering of buffers may cause the function to return an error.

When the buffer is done processing, the BufferCompletionCallback specified in OpenTraceFromBufferStream will be called to release it.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header evntrace.h
Library Sechost.lib on Windows 8.1 and Windows Server 2012 R2; Advapi32.lib on Windows 8, Windows Server 2012, Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista and Windows XP
DLL Sechost.dll on Windows 8.1 and Windows Server 2012 R2; Advapi32.dll on Windows 8, Windows Server 2012, Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista and Windows XP