StorPortEtwLogError function (storport.h)

StorPortEtwLogError logs an Event Tracing for Windows (ETW) event for a hardware protocol error.

Syntax

ULONG StorPortEtwLogError(
  [in]           PVOID         HwDeviceExtension,
  [in, optional] PSTOR_ADDRESS Address,
  [in]           ULONG         Id,
  [in]           PWSTR         Description,
  [in]           ULONG         DataBufferLength,
  [in]           PVOID         DataBuffer
);

Parameters

[in] HwDeviceExtension

A pointer to the miniport's device extension.

[in, optional] Address

The storage unit device address. This parameter is NULL for adapter devices.

[in] Id

A miniport-defined event ID that uniquely identifies the event.

[in] Description

The description text for the error. This parameter is required.

[in] DataBufferLength

Size of DataBuffer, in bytes.

[in] DataBuffer

A variable-size buffer that contains driver-specific binary data that is useful in identifying the cause of the error. Drivers must specify the size of this buffer in the DataBufferLength parameter.

Return value

This function returns one of the following status codes.

Return code Description
STOR_STATUS_SUCCESS The event was successfully logged.
STOR_STATUS_INVALID_PARAMETER Description or DataBuffer are NULL, or DataBufferLength is not greater than zero.
STOR_STATUS_UNSUCCESSFUL StorPort was unable to log the ETW event for other reasons, such as ETW logging is not enabled.

Remarks

A miniport can call StorPortEtwLogError to log an ETW event for a hardware protocol error. Events generated from this function are published to the "Microsoft-Windows-Storage-Storport/Operational" ETW channel.

Requirements

Requirement Value
Minimum supported client Windows 10 version 1903
Header storport.h

See also

StorPortEtwEvent2

StorPortEtwEvent4

StorPortEtwEvent8

StorPortEtwLogByteStream