5,662,937 members and growing! (19,321 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » Win32/64 SDK & OS » General     Beginner

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

By Saneesh

Retrieving Hard drive information using S.M.A.R.T.
VC6, VC7, C++Windows, WinXPVS.NET2003, VS6, Visual Studio, Dev

Posted: 6 Dec 2006
Updated: 25 May 2007
Views: 43,960
Bookmarked: 31 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
23 votes for this Article.
Popularity: 4.92 Rating: 3.61 out of 5
3 votes, 13.0%
1
2 votes, 8.7%
2
3 votes, 13.0%
3
3 votes, 13.0%
4
12 votes, 52.2%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

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


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

Other popular Win32/64 SDK & OS articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 25 of 63 (Total in Forum: 63) (Refresh)FirstPrevNext
Generalsmall bug's?memberCodeFlatter5:28 5 Sep '08  
GeneralRe: small bug's?memberSaneesh8:34 5 Sep '08  
GeneralAwesome mate !!memberasold200717:45 23 Aug '08  
GeneralRe: Awesome mate !!memberSaneesh17:54 23 Aug '08  
Generalhow to get the partition or size of the disk?? [modified]memberwarr~~en23:18 19 Jun '08  
GeneralRe: how to get the partition or size of the disk??memberSaneesh4:59 20 Jun '08  
GeneralRe: how to get the partition or size of the disk??memberwarr~~en5:39 20 Jun '08  
GeneralNo drives detectedmemberjaque-o23:55 12 Jun '08  
GeneralRe: No drives detectedmemberSaneesh5:05 13 Jun '08  
GeneralHow to use DeviceIoControl() api to write IDE HDD one or multiple sectors?memberitri9483422:34 2 Jun '08  
GeneralRe: How to use DeviceIoControl() api to write IDE HDD one or multiple sectors?memberSaneesh7:59 2 Jun '08  
GeneralNeed help for console application to read HDD tempmemberShiftlord0:10 12 Mar '08  
GeneralRe: Need help for console application to read HDD tempmemberSaneesh5:39 12 Mar '08  
GeneralRe: Need help for console application to read HDD tempmemberShiftlord6:24 12 Mar '08  
GeneralRe: Need help for console application to read HDD tempmemberSaneesh7:34 12 Mar '08  
GeneralRe: Need help for console application to read HDD tempmemberShiftlord7:41 12 Mar '08  
GeneralRe: Need help for console application to read HDD tempmemberShiftlord5:02 14 Mar '08  
GeneralRe: Need help for console application to read HDD tempmemberSaneesh7:41 14 Mar '08  
GeneralCompiling Errormemberkoala_wk18:51 14 Oct '07  
GeneralRe: Compiling ErrormemberSaneesh6:15 15 Oct '07  
GeneralAdmin rights required?memberoidamoh5:16 26 Sep '07  
GeneralRe: Admin rights required?memberSaneesh12:15 26 Sep '07  
GeneralCannot Detect any information under Vista OSmembermywork_00721:59 10 Aug '07  
GeneralRe: Cannot Detect any information under Vista OSmemberSaneesh14:12 12 Aug '07  
GeneralRe: Cannot Detect any information under Vista OSmembermywork_00722:16 12 Aug '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 25 May 2007
Editor:
Copyright 2006 by Saneesh
Everything else Copyright © CodeProject, 1999-2008
Web12 | Advertise on the Code Project