Click here to Skip to main content
14,361,552 members

Hard drive information using S.M.A.R.T.

Rate this:
4.33 (31 votes)
Please Sign up or sign in to vote.
4.33 (31 votes)
25 May 2007
Retrieving Hard drive information using S.M.A.R.T.

Sample Image - SMARTIMAGE.jpg

Introduction

This is very simple program which communicates with the Hard drive to get the information using S.M.A.R.T. available within the hard drive.

The core part is to prepare the command structure and pass it to the device driver which communicates with the hard drive. It uses the DeviceIoControl function. For eg: bRet=DeviceIoControl(hDevice,SMART_SEND_DRIVE_COMMAND,&stCIP,sizeof(stCIP),&stCOP,sizeof(stCOP),&dwRet,NULL);

Don't forget to include the "DDKInclude" folder in the workspace to your VC's include folder before compiling. This sample is only intended for beginners. Most of the information for S.M.A.R.T. is available in the net.

Also the information for each id is stored in an .ini file. You can see that in the Debug / Release folder.

Double click on any of the item in the list box to get more information about it. For e.g., xx sector count

Please contact me for any doubts and i will be happy to answer to your questions

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Saneesh
Software Developer (Senior)
United States United States
I am from the beautiful sea side town called Kochi ( cochin), Kerala, South India.

Comments and Discussions

 
QuestionCan you do this cove to delphi Pin
Member 1435927415-Oct-19 11:52
memberMember 1435927415-Oct-19 11:52 
Questionis posible do it in delphi Pin
Member 1435927414-Oct-19 13:48
memberMember 1435927414-Oct-19 13:48 
QuestionAbout temperature calculation Pin
Member 1383132616-May-18 23:15
memberMember 1383132616-May-18 23:15 
QuestionNo data read while running exe file Pin
Member 1307035822-May-17 1:26
memberMember 1307035822-May-17 1:26 
AnswerRe: No data read while running exe file Pin
Bokov Sergey27-Jun-17 4:59
memberBokov Sergey27-Jun-17 4:59 
QuestionGood Pin
el_tel22-Nov-16 5:45
memberel_tel22-Nov-16 5:45 
Generalbuild project in VS above 2008 Pin
creepy21-Jun-15 17:41
membercreepy21-Jun-15 17:41 
QuestionRead SMART DATA Pin
nareshlove10-Mar-14 4:55
membernareshlove10-Mar-14 4:55 
QuestionIs this code can damage Samsung F4 drives like smartmontools ? Pin
Shurwint26-Oct-13 5:32
memberShurwint26-Oct-13 5:32 
SuggestionPlease update the code and compile a new dll Pin
CitizenDC26-Jun-12 10:11
memberCitizenDC26-Jun-12 10:11 
GeneralRe: Please update the code and compile a new dll Pin
Saneesh26-Jul-12 4:54
memberSaneesh26-Jul-12 4:54 
BugRegarding RAW and Threshold Value Pin
Nidheesh V N16-May-12 19:49
memberNidheesh V N16-May-12 19:49 
GeneralRe: Regarding RAW and Threshold Value Pin
Saneesh17-May-12 5:34
memberSaneesh17-May-12 5:34 
QuestionProject settings Pin
jlkdaslkfjd31-Oct-11 1:24
memberjlkdaslkfjd31-Oct-11 1:24 
AnswerRe: Project settings Pin
Saneesh17-May-12 5:34
memberSaneesh17-May-12 5:34 
QuestionCan not compile in VC6.0 [modified] Pin
weishoumeng24-Aug-10 18:06
memberweishoumeng24-Aug-10 18:06 
AnswerRe: Can not compile in VC6.0 Pin
Saneesh30-Aug-10 18:21
memberSaneesh30-Aug-10 18:21 
GeneralBlank screen when click on 'Read SMART Values' Button Pin
Nicholas Amh20-Apr-10 21:32
memberNicholas Amh20-Apr-10 21:32 
GeneralRe: Blank screen when click on 'Read SMART Values' Button Pin
Saneesh21-Apr-10 6:20
memberSaneesh21-Apr-10 6:20 
GeneralRe: Blank screen when click on 'Read SMART Values' Button Pin
arun00219-Feb-11 4:22
memberarun00219-Feb-11 4:22 
GeneralC++ win32 console aplication Pin
madmat8714-Nov-09 14:57
membermadmat8714-Nov-09 14:57 
GeneralRe: C++ win32 console aplication Pin
Saneesh18-Nov-09 16:56
memberSaneesh18-Nov-09 16:56 
QuestionUse this Code for C# Pin
MasterChef23-Oct-09 10:31
memberMasterChef23-Oct-09 10:31 
AnswerRe: Use this Code for C# Pin
Saneesh24-Oct-09 7:35
memberSaneesh24-Oct-09 7:35 
QuestionRe: Use this Code for C# Pin
MasterChef25-Oct-09 7:10
memberMasterChef25-Oct-09 7:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Article
Posted 6 Dec 2006

Stats

284K views
14.9K downloads
68 bookmarked