大网数据广告活动
Windows 系统接口

SENSE_DATA structure (Scsi.h)

· 52CE 我爱测

Used to report status or error information in response to a SCSI Request Sense command.

Used to report status or error information in response to a SCSI Request Sense command.

Syntax

typedef struct _SENSE_DATA {
  UCHAR  ErrorCode  :7;
  UCHAR  Valid  :1;
  UCHAR  SegmentNumber;
  UCHAR  SenseKey  :4;
  UCHAR  Reserved  :1;
  UCHAR  IncorrectLength  :1;
  UCHAR  EndOfMedia  :1;
  UCHAR  FileMark  :1;
  UCHAR  Information[4];
  UCHAR  AdditionalSenseLength;
  UCHAR  CommandSpecificInformation[4];
  UCHAR  AdditionalSenseCode;
  UCHAR  AdditionalSenseCodeQualifier;
  UCHAR  FieldReplaceableUnitCode;
  UCHAR  SenseKeySpecific[3];
} SENSE_DATA, *PSENSE_DATA;

Members

ErrorCode

The report type.

Value Meaning
0x70 Current errors.
0x71 Deferred errors.

Valid

1 if the Information field is defined in a standard; otherwise the Information field is vendor-specific and not defined by a standard.

SegmentNumber

Obsolete.

SenseKey

Indicates the category of error.

No Sense (0x0)

Recovered Error (0x1)

Not Ready (0x2)

Medium Error (0x3)

Hardware Error (0x4)

Illegal Request (0x5)

Unit Attention (0x6)

Data Protect (0x7)

Firmware Error (0x9)

Aborted Command (0xB)

Equal (0xC)

Volume Overflow (0xD)

Miscompare (0xE)

Reserved

Reserved.

IncorrectLength

1 if the requested logical block length does not match the logical block length of the data on the media.

EndOfMedia

1 if a sequential-access device has reached end-of-media, or a printer is out of paper.

FileMark

1 if the current command has reached a filemark or setmark. Only valid for sequential-access devices.

Information

Device-type or command specific data.

AdditionalSenseLength

The length in bytes of the remainder of the structure. The total length minus 7.

CommandSpecificInformation

Command-specific data. Values are defined in the appropriate command standard.

AdditionalSenseCode

Device specific code that describes the error reported in the SenseKey field.

AdditionalSenseCodeQualifier

Can contain additional detail about the AdditionalSenseCode field.

FieldReplaceableUnitCode

Vendor-specific information about the component associated with this sense data.

SenseKeySpecific

The content and format of the sense key specific information is determined by the value of the SenseKey field.

Remarks

For more information about the sense data format, see SCSI Request Sense Command (https://wikipedia.org/wiki/SCSI_command).

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header Scsi.h

See also

iSCSI Target Pass-Through

SCSI_PASS_THROUGH_DIRECT

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。