|
hi, im getting 102 errors in the file SysInfoDefs.cpp
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(7) : error C2065: 'SENDCMDOUTPARAMS' : undeclared identifier
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(14) : error C2061: syntax error : identifier 'PSENDCMDINPARAMS'
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(22) : error C2065: 'PSENDCMDINPARAMS' : undeclared identifier
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(695) : error C2065: 'DRIVE_LAYOUT_INFORMATION_EX' : undeclared identifier
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(695) : error C2146: syntax error : missing ';' before identifier 'dli'
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(695) : error C2065: 'dli' : undeclared identifier
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(709) : error C2065: 'IOCTL_DISK_GET_DRIVE_LAYOUT_EX' : undeclared identifier
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(718) : error C2228: left of '.PartitionCount' must have class/struct/union type
D:\Programming\game programming\LEARNING\MFC\1\SysInfoDefs.cpp(721) : error C2228: left of '.PartitionCount' must have class/struct/union type
etc...
what could be wrong? thx
|
|
|
|
|
As I said in previous messages, you must have the latest Platform SDK (PSDK) and also must included before MFC header file definitions.
Best regards,
A. Riazi
|
|
|
|
|
hi all,
this is a great app. however, i noticed that for windows xp, the o.s. query returns windows 2000. is there a way to modify the program, so it will return xp as well?
|
|
|
|
|
You need to modify the source codes a little. See the header definitions.
Best regards,
A. Riazi
|
|
|
|
|
amir,
what would the IsWindowsXP function look like. what particular settings would distinguish it???? i know that it is in the windows nt family.
|
|
|
|
|
Hi,
I'm Abbas not Amir! The build number is useful for distinguish the Windows XP OS. I used another article from CP (Author: PJ Naughter) to wrote it.
Best regards,
A. Riazi
|
|
|
|
|
The current code seems to be unable to get centrino cpu speed. I have a 1.5GHz, and the returned CPU speed always varies from 500MHz to 1000MHz. What's scoop? Also, a 1.5GHz centrino is said equivalent to 2.4GHz regular cpu(more or less). How do we formally reflect this in the cpu speed?
|
|
|
|
|
I think it is because centrino cpu's have 'SpeedStep'. E.g. their speed changes depending on load.
|
|
|
|
|
All around a good package but.
1. there are missing code to handle *ALL* SMART HD details, because other ID codes are like 0xC2 for temperature. So the code needs to be changed to loop through all values, not just 12. To get the rest download hdtune.com's program, it lists them all. The code could also do with a function to read a specific AttrID of the SMART data but return the rawvalue, NOT THE AttrValue. I did that my self, and added a GetAttrIDValue( id, &result ) function.
2. one structure used a BYTE, then a WORD which stuffed up the auto padding with visual C++. I suggest that you ALWAYS use a BYTE halfs if your WORD is on an ODD boundary.
structure in question should be; (in smartdefs.h)
typedef struct _DRIVEATTRIBUTE {
BYTE bAttrID; // Identifies which attribute
BYTE wStatusFlagsL; // see bit definitions below
BYTE wStatusFlagsH; // see bit definitions below
BYTE bAttrValue; // Current normalized value
BYTE bWorstValue; // How bad has it ever been?
BYTE bRawValue[6]; // Un-normalized value
BYTE bReserved; // ...
} DRIVEATTRIBUTE, *PDRIVEATTRIBUTE, *LPDRIVEATTRIBUTE;
This GURANTEES it to work no matter what compiler you have, besides you dont even use that status flags any how.
Thats all... Enjoy the fix.
Hows the skiing in IRAN btw?
_______________________________
Raul Software Engineer (www.ac3dec.com
|
|
|
|
|
Thanks Raul,
Would you please to send me your code that I can share it with others?
Best regards,
A. Riazi
|
|
|
|
|
hummm... that part is just a "bad" copy/paste from the Microsoft example "smartapp":
http://download.microsoft.com/download/winddk/sample3/9x/W9X/EN-US/SmartApp.exe
why bad? cause it's not doing correctly the job... (founding 4 hard drives with your tool but 2, the real number, with the microsoft example)
next time try to copy/paste better
some good SMART sources there:
http://smartmontools.sourceforge.net/
cheers
-- modified at 0:12 Thursday 29th September, 2005
|
|
|
|
|
In the first release of the code, I didn't provide the S.M.A.R.T. infos but after some suggestions from others (like Raul Sobon) that you see under previous threads, I grabbed their source codes and add to mine.
Then it is not copy/paste, I didn't know that Microsoft has this!
Best regards,
A. Riazi
|
|
|
|
|
ok ok... if you have some free time maybe can you try to correct your code and add SMART scan on other disk than PhysicalDrive0 (when more than 1 drive... on NT based here)
cheers
bruno
|
|
|
|
|
I'm working on WMI version of my app. This new version queries all hardwares and give you more detailed info.
Unfortunately I haven't enough time now, may in future.
Best regards,
A. Riazi
|
|
|
|
|
is it possible that the check gives a wrong value when you want to know the CPU speed of a centrino. And any idea how you can get the correct one? Thanx.
|
|
|
|
|
Hi all,
I am a student, at Staffordshire University, UK, my
area of interest is mobile agent at wireless environment (mobile
computing). I would like to ask whether you have any information how
to use MATLAB tools to simulate a mobile computing system. In other
words, I want to build a wireless system (client/server) where data(an object user-defined) can be sent between mobile terminal and a server in order to carry out some tasks at the server and return with some results.
Any help would be appreciated
Regards,
Adel
|
|
|
|
|
In SysInfoDefs.h line 131 you miss a comma after (S.M.A.R.T.)"
...Plug & Pray...
|
|
|
|
|
You are right. Thanks for your comment.
A. Riazi
|
|
|
|
|
Nice Job BTW. It is quite usefull to me.
I thing that it whould be quite handy if it could export the results is some file (text, xml or anything).
...Plug & Pray...
|
|
|
|
|
I will do it in next update.
A. Riazi
|
|
|
|
|
hi !
How can i modify your code to retrieve hardware info about removable disks like USB disks ? is there an API available for that ?
thx
Kane
"Some guys hack just to get themselves a girkfriend.What a pathetic reason huh ? "
|
|
|
|
|
|
Hello folks.
I downloaded the example, installed the latest platform sdk for Windows 2000 and I have service pack 6 installed for Visual Studio. Unfortunately I'm still getting compile errors. I've read through all of the board messages for hints but I still can't get it working. Any help would be appreciated.
For Instance:
SysInfoDefs.cpp(695) : error C2065: 'DRIVE_LAYOUT_INFORMATION_EX' : undeclared identifier
And also:
SysInfoDlg.cpp(305) : error C2065: 'CSIDL_WINDOWS' : undeclared identifier
Jeff
|
|
|
|
|
1- You must add directories of PSDK to VC++ IDE.
2- These new directories must be included before MFC directories. e.g.:
c:\program files\Platform SDK\include
c:\MSVS\VC98\include
...
A. Riazi
|
|
|
|
|
That fixed the problem! Thank you for your help.
BTW, this is a great example!
|
|
|
|