DXGKCB_LOG_ETW_EVENT callback function

The DxgkCbLogEtwEvent function logs an Event Tracing for Windows (ETW) event.

Syntax

DXGKCB_LOG_ETW_EVENT DxgkcbLogEtwEvent;

void DxgkcbLogEtwEvent(
  const LPCGUID,
  UCHAR Type,
  USHORT EventBufferSize,
  PVOID EventBuffer
)
{...}

Parameters

LPCGUID

[in] A GUID that identifies the event to be logged.

Type

A constant that specifies the event type. These constants are defined in Evntrace.h and have the form of EVENT_TRACE_TYPE_XX.

EventBufferSize

The size, in bytes, of the buffer pointed to by EventBuffer. There is a significant performance penalty if the buffer is larger than 256 bytes.

EventBuffer

A pointer to a buffer that contains the information to be logged.

Return Value

None

Remarks

If event logging is not enabled, DxgkCbLogEtwEvent returns immediately without logging the event.

To enable or disable event logging, call the DxgkDdiControlEtwLogging function.

If EventBufferSize is less than or equal to 256, DxgkCbLogEtwEvent can be called an any IRQL. If EventBufferSize is greater than 256, DxgkCbLogEtwEvent must be called at IRQL = PASSIVE_LEVEL.

Examples

The following code example shows how to log an event with the event logger.

// {A7BF27A0-7401-4733-9FED-FDB51067FECC}
DEFINE_GUID(R200_DUMMY_LOGGING,
0xa7bf27a0, 0x7401, 0x4733, 0x9f, 0xed, 0xfd, 0xb5, 0x10, 0x67, 0xfe, 0xcc);

VOID
DummyTrace(
    HW_DEVICE_EXTENSION* Adapter
    )
{
    Adapter->ddiCallback.DxgkCbLogEtwEvent(&R200_DUMMY_LOGGING,
  EVENT_TRACE_TYPE_INFO,
  0,
  NULL);
}

Requirements

   
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header dispmprt.h (include Dispmprt.h)
IRQL See Remarks section.

See Also

DxgkDdiControlEtwLogging