Logs an event.
Syntax
ULONG EtwLogTraceEvent (
_In_ TRACEHANDLE LoggerHandle,
_In_ PEVENT_TRACE_HEADER EventTrace
)
Parameters
LoggerHandle [in]
Handle to an event tracing session, or 0. You must specify a non-zero SessionHandle if SessionName is NULL. ETW ignores the handle if SessionName is not NULL.
EventDescriptor [in]
An EVENT_TRACE_HEADER structure containing standard event tracing information common to all events written by TraceEvent.
Return value
A Win32 error code.
Remarks
This function is not defined in an SDK header and must be declared by the caller. This function is exported from ntdll.dll.
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
