ProcessTraceBufferIncrementReference function (evntrace.h)
Called during the BufferCallback on the provided Buffer to prevent it from being freed until the caller is done with it.
Syntax
ETW_APP_DECLSPEC_DEPRECATED ULONG WMIAPI ProcessTraceBufferIncrementReference(
TRACEHANDLE TraceHandle,
const ETW_BUFFER_HEADER *Buffer
);
Parameters
TraceHandle
The processing session that this Buffer came from.
Buffer
The buffer to reference. This buffer must have been obtained by a call to the PETW_BUFFER_CALLBACK callback.
Return value
Win32 Error Code. Possible codes may include ERROR_INVALID_PARAMETER and ERROR_OUTOFMEMORY.
Remarks
If ProcessTraceBufferIncrementReference is not called on a Buffer during the PETW_BUFFER_CALLBACK then the memory is no longer accessible after the PETW_BUFFER_CALLBACK returns.
The caller is responsible for calling ProcessTraceBufferDecrementReference on the Buffer once they are done with it. ProcessTrace will not return until this has been done for every buffer that was incremented.
ProcessTraceBufferIncrementReference is not supported for buffers provided by a processing session opened by OpenTraceFromBufferStream.
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 |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for