Click here to Skip to main content
6,295,667 members and growing! (16,141 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, VC7WinXPVS.NET2003, Dev
Posted:6 Dec 2006
Updated:25 May 2007
Views:57,855
Bookmarked:42 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
24 votes for this article.
Popularity: 5.01 Rating: 3.63 out of 5
3 votes, 12.5%
1
2 votes, 8.3%
2
3 votes, 12.5%
3
3 votes, 12.5%
4
13 votes, 54.2%
5

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


Member
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
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 71 (Total in Forum: 71) (Refresh)FirstPrevNext
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  
Generalsmall bug's? PinmemberCodeFlatter5:28 5 Sep '08  
GeneralRe: small bug's? PinmemberSaneesh8:34 5 Sep '08  
GeneralAwesome mate !! Pinmemberasold200717:45 23 Aug '08  
GeneralRe: Awesome mate !! PinmemberSaneesh17:54 23 Aug '08  
Generalhow to get the partition or size of the disk?? [modified] Pinmemberwarr~~en23:18 19 Jun '08  
GeneralRe: how to get the partition or size of the disk?? PinmemberSaneesh4:59 20 Jun '08  
GeneralRe: how to get the partition or size of the disk?? Pinmemberwarr~~en5:39 20 Jun '08  
GeneralNo drives detected Pinmemberjaque-o23:55 12 Jun '08  
GeneralRe: No drives detected PinmemberSaneesh5:05 13 Jun '08  
GeneralHow to use DeviceIoControl() api to write IDE HDD one or multiple sectors? Pinmemberitri9483422:34 2 Jun '08  
GeneralRe: How to use DeviceIoControl() api to write IDE HDD one or multiple sectors? PinmemberSaneesh7:59 2 Jun '08  
GeneralNeed help for console application to read HDD temp PinmemberShiftlord0:10 12 Mar '08  
GeneralRe: Need help for console application to read HDD temp PinmemberSaneesh5:39 12 Mar '08  
GeneralRe: Need help for console application to read HDD temp PinmemberShiftlord6:24 12 Mar '08  
GeneralRe: Need help for console application to read HDD temp PinmemberSaneesh7:34 12 Mar '08  
GeneralRe: Need help for console application to read HDD temp PinmemberShiftlord7:41 12 Mar '08  
GeneralRe: Need help for console application to read HDD temp PinmemberShiftlord5:02 14 Mar '08  

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-2009
Web12 | Advertise on the Code Project