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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2018-03-15 英文外包