Click here to Skip to main content
Licence 
First Posted 6 Dec 2006
Views 105,145
Downloads 2,735
Bookmarked 61 times

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

By Saneesh | 25 May 2007 | Unedited contribution
Retrieving Hard drive information using S.M.A.R.T.
3 votes, 11.1%
1
2 votes, 7.4%
2
3 votes, 11.1%
3
5 votes, 18.5%
4
14 votes, 51.9%
5
4.29/5 - 27 votes
3 removed
μ 3.77, σa 2.52 [?]

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

About the Author

Saneesh

Software Developer (Senior)

United States United States

Member
I am from the beautiful sea side town called Kochi ( cochin), Kerala, South India.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionProject settings Pinmemberjlkdaslkfjd1:24 31 Oct '11  
QuestionCan not compile in VC6.0 [modified] Pinmemberweishoumeng18:06 24 Aug '10  
AnswerRe: Can not compile in VC6.0 PinmemberSaneesh18:21 30 Aug '10  
GeneralBlank screen when click on 'Read SMART Values' Button PinmemberNicholas Amh21:32 20 Apr '10  
GeneralRe: Blank screen when click on 'Read SMART Values' Button PinmemberSaneesh6:20 21 Apr '10  
GeneralRe: Blank screen when click on 'Read SMART Values' Button Pinmemberarun0024:22 19 Feb '11  
GeneralC++ win32 console aplication Pinmembermadmat8714:57 14 Nov '09  
GeneralRe: C++ win32 console aplication PinmemberSaneesh16:56 18 Nov '09  
QuestionUse this Code for C# PinmemberMasterChef10:31 23 Oct '09  
AnswerRe: Use this Code for C# PinmemberSaneesh7:35 24 Oct '09  
QuestionRe: Use this Code for C# PinmemberMasterChef7:10 25 Oct '09  
QuestionHow can read the S.M.A.R.T information with C# PinmemberAlexXie4:37 23 Aug '09  
AnswerRe: How can read the S.M.A.R.T information with C# PinmemberSaneesh13:22 24 Aug '09  
GeneralRe: How can read the S.M.A.R.T information with C# PinmemberAlexXie4:48 25 Aug '09  
GeneralSupport for SCSI HDD PinmemberDP3217:23 6 Apr '09  
GeneralRe: Support for SCSI HDD PinmemberSaneesh7:15 7 Apr '09  
GeneralRe: Support for SCSI HDD Pinmembersukhas1919:08 8 Apr '09  
GeneralRe: Support for SCSI HDD Pinmembersukhas1922:00 19 Apr '09  
GeneralRe: Support for SCSI HDD PinmemberSaneesh5:12 21 Apr '09  
GeneralRe: Support for SCSI HDD PinmemberSaneesh5:13 21 Apr '09  
GeneralThresholds PinmemberKenshin2k23:18 29 Dec '08  
GeneralRe: Thresholds PinmemberSaneesh4:42 30 Dec '08  
Questionsmall bug's? PinmemberCodeFlatter5:28 5 Sep '08  
AnswerRe: small bug's? PinmemberSaneesh8:34 5 Sep '08  
GeneralAwesome mate !! Pinmemberasold200717:45 23 Aug '08  

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

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120210.1 | Last Updated 25 May 2007
Article Copyright 2006 by Saneesh
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid