// storport.h
ULONG StorPortEtwLogError(
[in] PVOID HwDeviceExtension,
[in, optional] PSTOR_ADDRESS Address,
[in] ULONG Id,
[in] PWSTR Description,
[in] ULONG DataBufferLength,
[in] PVOID DataBuffer
);
View the official Windows Driver Kit DDI referenceNo description available.
StorPortEtwLogError logs an Event Tracing for Windows (ETW) event for a hardware protocol error.
HwDeviceExtension [in]A pointer to the miniport's device extension.
Address [in, optional]The storage unit device address. This parameter is NULL for adapter devices.
Id [in]A miniport-defined event ID that uniquely identifies the event.
Description [in]The description text for the error. This parameter is required.
DataBufferLength [in]Size of DataBuffer, in bytes.
DataBuffer [in]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.
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. |
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.