 |
|
 |
Dear Saneesh,
Your sample program is very helpful to understand the S.M.A.R.T information. But we feel there are some mistakes in your logic for calculating the RAW and threshold value. Only 2 Bytes are considered in case of RAW value but 4bytes are supported. Index used to get threshold value is wrong hence always getting zero for threshold value.
Regards,
Nidheesh VN
|
|
|
|
 |
|
 |
I just made is work at the time i coded it. Didn't check it in much detail. Tried with couple of drives and it was working. I guess more work needs to be done there. Good luck..
Saneesh
|
|
|
|
 |
|
 |
I cannot seem to build this in VS 2010, I left all the settings intact. Is there some project configuration that must be done to silence the intelli-sense errors?
|
|
|
|
 |
|
 |
I didn't tried it on VS 2010. You may have to change some settings. Just follow the errors.
Saneesh
|
|
|
|
 |
|
 |
Hi, I succeed to run the SMART.exe, but when I try rebuild SMART.dsw in VC6.0, I get some Compile error message(DDKInclude path already setting), Any idea how can i solve it? thank!
e:\smart\ddkinclude\winreg.h(107) : error C2146: syntax error : missing ';' before identifier 've_valueptr'
e:\smart\ddkinclude\winreg.h(107) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\smart\ddkinclude\winreg.h(107) : error C2501: 've_valueptr' : missing storage-class or type specifiers
e:\smart\ddkinclude\winreg.h(113) : error C2146: syntax error : missing ';' before identifier 've_valueptr'
e:\smart\ddkinclude\winreg.h(113) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\smart\ddkinclude\winreg.h(113) : error C2501: 've_valueptr' : missing storage-class or type specifiers
e:\smart\ddkinclude\winreg.h(145) : error C2065: 'HKEY' : undeclared identifier
e:\smart\ddkinclude\winreg.h(146) : error C2146: syntax error : missing ')' before identifier 'hKey'
e:\smart\ddkinclude\winreg.h(146) : warning C4229: anachronism used : modifiers on data are ignored
e:\smart\ddkinclude\winreg.h(146) : error C2491: 'RegCloseKey' : definition of dllimport data not allowed
e:\smart\ddkinclude\winreg.h(146) : error C2059: syntax error : ')'
e:\smart\ddkinclude\winreg.h(152) : error C2146: syntax error : missing ')' before identifier 'hKey'
e:\smart\ddkinclude\winreg.h(152) : warning C4229: anachronism used : modifiers on data are ignored
e:\smart\ddkinclude\winreg.h(152) : error C2491: 'RegOverridePredefKey' : definition of dllimport data not allowed
e:\smart\ddkinclude\winreg.h(154) : error C2059: syntax error : ')'
e:\smart\ddkinclude\winreg.h(163) : error C2061: syntax error : identifier 'PHKEY'
e:\smart\ddkinclude\winreg.h(171) : error C2061: syntax error : identifier 'PHKEY'
...
modified on Tuesday, August 24, 2010 11:12 PM
|
|
|
|
 |
|
 |
Looks like you are missing some basic header files. I made this in VS 2003.
Can you try to add the necessary header files and see how it is going?
Saneesh
|
|
|
|
 |
|
 |
Hi, I can't get anything when i run the program, no error at all, just blank. I try to 2 computers, one on xp and another on window 7. Any idea how can i solve it. Hope to hear from you soon
|
|
|
|
 |
|
 |
Windows 7, i dont know. I never tried. I send you a different email early with more details.
Saneesh
|
|
|
|
 |
|
 |
Run the program as administrator in windows 7 it will solve the issue
|
|
|
|
 |
|
 |
Hi, can you help me pls, how can i use this code in a win32 console aplication, what to include in the *.cpp file where my main() is, and how do you include DDKInclude in the workspace?
|
|
|
|
 |
|
 |
Just set the path properly in your console application and that should take care of the path problem. Keeping the .cpp is better because it is easy to manage.
Saneesh
|
|
|
|
 |
|
 |
And which DLL I have to take? Can you post a smart sample code for me?
|
|
|
|
 |
|
 |
You can do it. Try. Just export those fns like DeviceIOControl and try..
Saneesh
|
|
|
|
 |
|
 |
I would like to try. But how can I export the functions? I'm sorry, but i've never done that.
|
|
|
|
 |
|
 |
How can read the S.R.A.R.T information with C# language?
Anybody can provide some methods for me.thanks!
|
|
|
|
 |
|
 |
You can export the deviceiocontrol and other relevant functions as below.
[DllImport("xxxx.dll")]
public static extern fnType fnName ( Params );
With this, you can call and execute the code from C#
Saneesh
|
|
|
|
 |
|
 |
Thanks Saneesh!
You mean i can use the dll that was build by C++, is that right?
But i just want to known how can i only use the C# language to build a dll and use it.
Can you give me some advice about this?
|
|
|
|
 |
|
 |
Did anyone had any luck with using this program to monitor SMART params for HDDs that are connected through SCSI? It is giving device I/O errors. Any help is appreciated.
|
|
|
|
 |
|
 |
I never tried on a SCSI hard drive. What error code is it getting for DeviceIoControl?
Saneesh
|
|
|
|
 |
|
 |
Hi Saneesh,
DeviceIoControl control returns the error code 1117 which is error code for I/O device error.
Regards,
Sukhas
|
|
|
|
 |
|
 |
Hi Saneesh, Could you please throw some light on the error code for the SCSI hard disks?
sukhas
|
|
|
|
 |
|
 |
I never tried on the SCSI. Did you tried any other deviceiocontrol codes with scsi?
Saneesh
|
|
|
|
 |
|
 |
May be the driver does not like it. Can you check with a sample scsi disk driver code?
Saneesh
|
|
|
|
 |
|
 |
Hello,
i have some probs on my laptop and desktop pc...both xp machines..
all the threshhold values are 0....smartmontools and hddlife is getting other and i think correct threshold values ?
any idea how to get the right ones
|
|
|
|
 |
|
 |
Did you tried to debug and see if the buffer is getting values properly? Also the .ini file, is that in the executable / debug path? Without that the code wont work.
Saneesh
|
|
|
|
 |