msdn 硬盘

https://msdn.microsoft.com/library/windows/hardware/ff566204

Returns the ATA-2 identify data, the Self-Monitoring Analysis and Reporting Technology (SMART) thresholds, or the SMART attributes for the device. This IOCTL must be handled by drivers that support SMART.

Input Parameters
The buffer at Irp->AssociatedIrp.SystemBuffer contains a SENDCMDINPARAMS structure that describes the request being sent to the device. The irDriveRegs.bCommandReg member specifies ID_CMD when identify data is requested and SMART_CMD when SMART data is requested. For a list of values that can be assigned to the features register (irDriveRegs.bFeaturesReg), see IDEREGS.
Parameters.DeviceIoControl.InputBufferLength specifies the size, in bytes, of the input buffer, which must be >= (sizeof(SENDCMDINPARAMS) - 1).
Parameters.DeviceIoControl.OutputBufferLength specifies the size, in bytes, of the output buffer, which must be >= (sizeof(SENDCMDOUTPARAMS) - 1 + 512).
Output Parameters
The driver returns the SENDCMDOUTPARAMS structure and a 512-byte buffer of drive data to the buffer at Irp->AssociatedIrp.SystemBuffer.
If the caller specifies a SMART subcommand of SMART_READ_LOG in rDriveRegs.bFeaturesReg, the caller must also indicate the number of sectors to read in irDriveRegs.bSectorCountReg. The output buffer size must be >= the maximum of two values:
sizeof(SENDCMDOUTPARAMS) or
sizeof(SENDCMDINPARAMS)) -1 + (irDriveRegs.bSectorCountReg * SMART_LOG_SECTOR_SIZE).
The data read from the log will be placed in the buffer specified by the bBuffer member of SENDCMDOUTPARAMS.
I/O Status Block
The driver sets the Information field to (sizeof(SENDCMDOUTPARAMS) - 1 + 512) when it sets the Status field to STATUS_SUCCESS. Otherwise, the driver sets the Information field to zero and the Status field to possibly STATUS_INVALID_PARAMETER or STATUS_INSUFFICIENT_RESOURCES.
Requirements

Version
Supported in Microsoft Windows 2000 and later operating systems.
Header
Ntdddisk.h (include Ntdddisk.h)
See also

SENDCMDINPARAMS
SENDCMDOUTPARAMS

posted on   lydstory  阅读(98)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2018-03-15 英文外包

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示