TraceLoggingBinary macro (traceloggingprovider.h)

TraceLogging wrapper macro that adds a field with binary data to the event.

Syntax

void TraceLoggingBinary(
  [in]            pValue,
  [in]            cbValue,
  [in, optional]  __VA_ARGS__
);

Parameters

[in] pValue

A pointer to the data to be included in the event.

[in] cbValue

The size, in bytes, of the data to be included in the event.

[in, optional] __VA_ARGS__

Optional name, description, and tags parameters for the field definition.

TraceLoggingBinary can be specified with 2, 3, 4, or 5 parameters. If an optional parameter is not specified, a default will be used. For example, TraceLoggingBinary(&x.data, sizeof(x.data)) is equivalent to TraceLoggingBinary(&x.data, sizeof(x.data), "&x.data", "", 0).

  • [in, optional] name

    The name to use for the event field. If provided, the name parameter must be a string literal (not a variable) and must not contain any '\0' characters. If not provided, the event field name will be based on pValue.

  • [in, optional] description

    The description of the event field's value. If provided, the description parameter must be a string literal and will be included in the PDB.

  • [in, optional] tags

    A compile-time constant integer value. The low 28 bits of the value will be included in the field's metadata. The semantics of this value are defined by the event consumer. During event processing, this value can be retrieved from the EVENT_PROPERTY_INFO Tags field.

Return value

None

Remarks

TraceLoggingBinary(pValue, cbValue, ...) can be used as a parameter to an invocation of a TraceLoggingWrite macro. Each TraceLoggingBinary parameter adds one field to the event.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header traceloggingprovider.h

See also

TraceLoggingWrite

TraceLogging wrapper macros