Click here to Skip to main content
Click here to Skip to main content

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

, 25 May 2007
Rate this:
Please Sign up or sign in to vote.
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

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

 
QuestionRead SMART DATA PinmemberMember 1060765510-Mar-14 3:55 
QuestionIs this code can damage Samsung F4 drives like smartmontools ? PinmemberShurwint26-Oct-13 4:32 
SuggestionPlease update the code and compile a new dll PinmemberCitizenDC26-Jun-12 9:11 
GeneralRe: Please update the code and compile a new dll PinmemberSaneesh26-Jul-12 3:54 
BugRegarding RAW and Threshold Value PinmemberNidheesh V N16-May-12 18:49 
GeneralRe: Regarding RAW and Threshold Value PinmemberSaneesh17-May-12 4:34 
QuestionProject settings Pinmemberjlkdaslkfjd31-Oct-11 0:24 
AnswerRe: Project settings PinmemberSaneesh17-May-12 4:34 
QuestionCan not compile in VC6.0 [modified] Pinmemberweishoumeng24-Aug-10 17:06 
AnswerRe: Can not compile in VC6.0 PinmemberSaneesh30-Aug-10 17:21 
GeneralBlank screen when click on 'Read SMART Values' Button PinmemberNicholas Amh20-Apr-10 20:32 
GeneralRe: Blank screen when click on 'Read SMART Values' Button PinmemberSaneesh21-Apr-10 5:20 
GeneralRe: Blank screen when click on 'Read SMART Values' Button Pinmemberarun00219-Feb-11 3:22 
GeneralC++ win32 console aplication Pinmembermadmat8714-Nov-09 13:57 
GeneralRe: C++ win32 console aplication PinmemberSaneesh18-Nov-09 15:56 
QuestionUse this Code for C# PinmemberMasterChef23-Oct-09 9:31 
AnswerRe: Use this Code for C# PinmemberSaneesh24-Oct-09 6:35 
QuestionRe: Use this Code for C# PinmemberMasterChef25-Oct-09 6:10 
QuestionHow can read the S.M.A.R.T information with C# PinmemberAlexXie23-Aug-09 3:37 
AnswerRe: How can read the S.M.A.R.T information with C# PinmemberSaneesh24-Aug-09 12:22 
GeneralRe: How can read the S.M.A.R.T information with C# PinmemberAlexXie25-Aug-09 3:48 
GeneralSupport for SCSI HDD PinmemberDP3216-Apr-09 6:23 
GeneralRe: Support for SCSI HDD PinmemberSaneesh7-Apr-09 6:15 
GeneralRe: Support for SCSI HDD Pinmembersukhas198-Apr-09 18:08 
GeneralRe: Support for SCSI HDD Pinmembersukhas1919-Apr-09 21:00 
GeneralRe: Support for SCSI HDD PinmemberSaneesh21-Apr-09 4:12 
GeneralRe: Support for SCSI HDD PinmemberSaneesh21-Apr-09 4:13 
GeneralThresholds PinmemberKenshin2k29-Dec-08 22:18 
GeneralRe: Thresholds PinmemberSaneesh30-Dec-08 3:42 
Questionsmall bug's? PinmemberCodeFlatter5-Sep-08 4:28 
AnswerRe: small bug's? PinmemberSaneesh5-Sep-08 7:34 
GeneralAwesome mate !! Pinmemberasold200723-Aug-08 16:45 
GeneralRe: Awesome mate !! PinmemberSaneesh23-Aug-08 16:54 
Questionhow to get the partition or size of the disk?? [modified] Pinmemberwarr~~en19-Jun-08 22:18 
AnswerRe: how to get the partition or size of the disk?? PinmemberSaneesh20-Jun-08 3:59 
GeneralRe: how to get the partition or size of the disk?? Pinmemberwarr~~en20-Jun-08 4:39 
GeneralNo drives detected Pinmemberjaque-o12-Jun-08 22:55 
GeneralRe: No drives detected PinmemberSaneesh13-Jun-08 4:05 
QuestionHow to use DeviceIoControl() api to write IDE HDD one or multiple sectors? Pinmemberitri9483422-Jun-08 1:34 
AnswerRe: How to use DeviceIoControl() api to write IDE HDD one or multiple sectors? PinmemberSaneesh2-Jun-08 6:59 
GeneralNeed help for console application to read HDD temp PinmemberShiftlord11-Mar-08 23:10 
GeneralRe: Need help for console application to read HDD temp PinmemberSaneesh12-Mar-08 4:39 
GeneralRe: Need help for console application to read HDD temp PinmemberShiftlord12-Mar-08 5:24 
GeneralRe: Need help for console application to read HDD temp PinmemberSaneesh12-Mar-08 6:34 
GeneralRe: Need help for console application to read HDD temp PinmemberShiftlord12-Mar-08 6:41 
GeneralRe: Need help for console application to read HDD temp PinmemberShiftlord14-Mar-08 4:02 
GeneralRe: Need help for console application to read HDD temp PinmemberSaneesh14-Mar-08 6:41 
GeneralCompiling Error Pinmemberkoala_wk14-Oct-07 17:51 
GeneralRe: Compiling Error PinmemberSaneesh15-Oct-07 5:15 
QuestionAdmin rights required? Pinmemberoidamoh26-Sep-07 4:16 

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.

| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 25 May 2007
Article Copyright 2006 by Saneesh
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid