 |
|
 |
Hello, Thank you very much for your source, it's really too nice. There is a little mistake when select item in the combox, this is due to a forgoten "," in the initialisation of Query[NUM_OF_QUERIES][50] in SysInfoDefs.h after "Hard Disk Features (S.M.A.R.T.)"
Best regards
Aramii.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Hi Iain Chesworth Thank you very much for Class CPUinfo My program , I want to get CPU info with all chip. But I don't Please help me ?
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
hi mr riaz plz help me i post Qustion bt no anser i m lays plz helpme im student n wants ur help on this project
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
system information hardware.software by abbas riaz;have 32 errors hw can i used it ?????????????????? error list is
ysInfoDefs.cpp(695) : error C2065: 'DRIVE_LAYOUT_INFORMATION_EX' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(695) : error C2146: syntax error : missing ';' before identifier 'dli' C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(695) : error C2065: 'dli' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(709) : error C2065: 'IOCTL_DISK_GET_DRIVE_LAYOUT_EX' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(718) : error C2228: left of '.PartitionCount' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(721) : error C2228: left of '.PartitionCount' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(726) : error C2228: left of '.PartitionStyle' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(728) : error C2065: 'PARTITION_STYLE_MBR' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(728) : error C2051: case expression not constant C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(732) : error C2228: left of '.Mbr' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(732) : error C2228: left of '.Signature' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(736) : error C2065: 'PARTITION_STYLE_GPT' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(736) : error C2051: case expression not constant C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(740) : error C2228: left of '.Gpt' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(740) : error C2228: left of '.DiskId' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(743) : error C2228: left of '.Gpt' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(743) : error C2228: left of '.StartingUsableOffset' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(745) : error C2228: left of '.Gpt' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(745) : error C2228: left of '.UsableLength' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(747) : error C2228: left of '.Gpt' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(747) : error C2228: left of '.MaxPartitionCount' must have class/struct/union type C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(751) : error C2065: 'PARTITION_STYLE_RAW' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(751) : error C2051: case expression not constant C:\Documents and Settings\amna\Desktop\sys\SysInfoDefs.cpp(761) : warning C4065: switch statement contains 'default' but no 'case' labels SysInfoDlg.cpp C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(305) : error C2065: 'CSIDL_WINDOWS' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(311) : error C2065: 'CSIDL_SYSTEM' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(359) : error C2065: 'CSIDL_LOCAL_APPDATA' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(365) : error C2065: 'CSIDL_MYDOCUMENTS' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(371) : error C2065: 'CSIDL_PROGRAM_FILES' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(401) : error C2065: 'CSIDL_ADMINTOOLS' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(425) : error C2065: 'CSIDL_PROFILE' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(461) : error C2065: 'CSIDL_COMMON_ADMINTOOLS' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(467) : error C2065: 'CSIDL_COMMON_APPDATA' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(473) : error C2065: 'CSIDL_COMMON_DOCUMENTS' : undeclared identifier C:\Documents and Settings\amna\Desktop\sys\SysInfoDlg.cpp(479) : error C2065: 'CSIDL_COMMON_TEMPLATES' : undeclared identifier Generating Code... Error executing cl.exe.
SysInfo.exe - 34 error(s), 1 warning(s)
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
Hi Razi,
Your source for retrieving system informations is very good and very clear! It helped me a lot with a small project (getting status and notifications of a server, when something is not working properly). The other acrticles of yours are also very good, especially the one about GPS. I just want to say thank you for your good help.
**We are an example of helping each other**
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Mr. A.Razi,
I hope you can answer on this question, if you're able to make some time free in your valueble free spare time. How can I distinguish between a USB memory stick and a Harddisk drive? Because when I connect a usb stick into the pc, I get the USB memory size and etc...
Suddenly in my mind comes up to check the filesystem type ( HDD = NTFS, USB = FAT32 ), something like that. What do you think about that?
**We are an example of helping each other**
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I have some questions about HD Physical information. Can you help me in this regard.
Questions: 1)Where the Physical information( say Cylinder, Head, Sector)reside? 2) How can I get these information?
|
| Sign In·View Thread·PermaLink | 4.00/5 (3 votes) |
|
|
|
 |
|
 |
Dear All,
When I try to download the source,
A pop-up window displayed asking for username and password.
I have provided my code project username and password and clicked ok - still I am unable to download the source.. help me..

|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi, great program.
Any code or thoughts on how to detect S.M.A.R.T. info for SCSI drives?
Thanks, Will
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
I tried to retrive the CPU serial number of the AMD 64 but it doesn't work . What must I do to get the 64 bit procesor serial number.
Thanks
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
If I remembered correctly, the code only works with Intel CPUs. Try google or AMD site to find some code for retrieving CPU serial number.
Best regards, A. Riazi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Abbas
I compiled and executed your sample, I recieved a error in the edit box when I chose Partitions from the combo. So I took a look a your source code.
Heres what I discovered:
In QueryPartitions funtion, the call to DeviceIoControl will sometimes fail with the error code ERROR_INSUFFICIENT_BUFFER. This is because the struct DRIVE_LAYOUT_INFORMATION_EX that needs to be passed to DeviceIoControl is variable length, the size of the data returned depends on the number of drives, and partitions.
In addition, some driver implementations will return a partial buffer, they will simply write whatever data they can fit into the buffer. DeviceIoControl will fail with error code ERROR_MORE_DATA in this case.
These conditions can be handled by doing the following:
First change variable dli declaration to:
DRIVE_LAYOUT_INFORMATION_EX* dli = NULL;
Here is the code to insert:
DWORD dwbytes=0; DWORD dwlastErr = 0; int i=0;
do { if(NULL != dli) { delete[] (char*)dli; dli = NULL; }
DWORD datasize = sizeof(DRIVE_LAYOUT_INFORMATION_EX) + i * sizeof(PARTITION_INFORMATION_EX); dli = (DRIVE_LAYOUT_INFORMATION_EX*)new char[datasize]; if(dli) { bResult=DeviceIoControl(hDevice,IOCTL_DISK_GET_DRIVE_LAYOUT_EX,NULL,0,dli, datasize,&dwbytes,(LPOVERLAPPED) NULL); dwlastErr = GetLastError(); i++; } } while((dwbytes == 0 && dwlastErr == ERROR_INSUFFICIENT_BUFFER) || dwlastErr == ERROR_MORE_DATA);
The code needs to be modified here:
while (hDevice!=INVALID_HANDLE_VALUE) { ***DELETE OLD CODE HERE*** ***INSERT NEW CODE HERE***
if (bResult) {
Then at the bottom of the QueryPartitions function add:
if(NULL != dli) { delete[] (char*)dli; dli = NULL; }
I believe something similar is required for each function where you are calling DeviceIoControl. Additional error handling is required.
Thanks for your articles, I look forward to your future contributions!
-Randor (Dave Delaune)
|
| Sign In·View Thread·PermaLink | 2.00/5 (3 votes) |
|
|
|
 |
|
 |
Hi A.Riazi, can I call you like that.I'm a student from Viet Nam and I'm doing a project to get system information but it's hard to find document about this topic.I have seen your code but I don't know how it's work .Can you give or introduce me some document about getting system information.
-- modified at 6:34 Tuesday 11th April, 2006
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi, You have two options for getting system informations: 1- WMI 2- Win32 API (like the one that I did).
I suggest you to read Win32 API documentations.
Best regards, A. Riazi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I see that you have use assembly code in your source .What does it do?
-- modified at 4:15 Wednesday 12th April, 2006
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Can you please include a function to retrieve hard Drive serial number (atleast first drive). It would be very helpful.
Thanks nomi knowmi@gmail.com
|
| Sign In·View Thread·PermaLink | 1.57/5 (5 votes) |
|
|
|
 |
|
 |
i am getting compilation error CSIDL_WINDOWS etc. as undeclared identifier. i read the solution for it posted.but i couldn'g understand that. can u just explain how and what i have to add breifly.
|
| Sign In·View Thread·PermaLink | 2.25/5 (7 votes) |
|
|
|
 |
|
 |
At line 286 in SysInfoDefs.cpp you wrote: ceil(memoryStatus.dwTotalPhys/1024/1024)
It should be: ceil(memoryStatus.dwTotalPhys/1024.0/1024.0) if you want the ceil function to have an effect.
The best would be: ceil(memoryStatus.dwTotalPhys/1048576.0) One division less
Crayon
|
| Sign In·View Thread·PermaLink | 2.00/5 (3 votes) |
|
|
|
 |
|
|
 |