WmiTraceMessageVa - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

NTSTATUS WmiTraceMessageVa(
  [in] TRACELOGGER_HANDLE LoggerHandle,
  [in] ULONG              MessageFlags,
  [in] LPCGUID            MessageGuid,
  [in] USHORT             MessageNumber,
  [in] va_list            MessageArgList
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-wmitracemessageva)

WmiTraceMessageVa function

Description

The WmiTraceMessageVa routine adds a message to the output log of a WPP software tracing session.

Parameters

LoggerHandle [in]

Specifies a trace handle for a software tracing session.

MessageFlags [in]

Specifies a bitwise OR of one or more message flags. See the Remarks section for details.

MessageGuid [in]

Specifies a GUID that identifies a software trace class.

MessageNumber [in]

Identifies the message subtype. The meaning of subtypes is specific to the software trace class and the provider.

MessageArgList [in]

Provides a required list of message parameters that specify a set of message parts. The parameters are organized as a sequence of parameter pairs, where each pair specifies one part of the complete message. Each parameter pair consists of a PVOID pointer to data, followed immediately by a ULONG value that specifies the length of the data. The parameter list must be terminated by a NULL PVOID pointer followed by a ULONG(0).

Return value

WmiTraceMessageVa returns one of the following values:

Return code Description
STATUS_SUCCESS The operation completed successfully.
STATUS_INVALID_HANDLE LoggerHandle is not a valid software trace handle.
STATUS_NO_MEMORY There is insufficient buffer memory to log the message. See the Remarks section for more information.
Other NTSTATUS value An internal error occurred.

Remarks

A caller can use WmiTraceMessage or WmiTraceMessageVa to add a message to the output log of a WPP software tracing session. WmiTraceMessage simplifies a caller's code by handling the variable list mechanism before calling WmiTraceMessageVa.

A caller can set the following message flags:

Flag Description
TRACE_MESSAGE_SEQUENCE Include a sequence number in the message. Message sequencing can only be used if it is enabled for the software tracing session specified by LoggerHandle.
TRACE_MESSAGE_GUID MessageGuid specifies a GUID that identifies a software trace class. This flag must be set.
TRACE_MESSAGE_TIMESTAMP Include a time stamp in the message.
TRACE_MESSAGE_PERFORMANCE_TIMESTAMP This flag is not implemented and is obsolete. It must not be used.
TRACE_MESSAGE_SYSTEMINFO Include the thread identifier (TID) and process identifier (PID) in the message.

WmiTraceMessageVa does not log the message if one of the following is true:

WmiTraceMessageVa runs at the IRQL of the caller.

See also

IoWmiWriteEvent

TRACE_INFORMATION_CLASS

WmiFireEvent

WmiQueryTraceInformation

WmiTraceMessage