 |

|
thank you but please explane the code.
|
|
|
|
|

|
Note: Only tested on XP/32 - compiled in VC6/C++
#include <intrin.h>
CString CPU_Name()
{
int CPUInfo[4] = {-1};
__cpuid(CPUInfo, 0x80000000);
unsigned int nExIds = CPUInfo[0];
char CPUBrandString[0x40] = { 0 };
for( unsigned int i=0x80000000; i<=nExIds; ++i)
{
__cpuid(CPUInfo, i);
if (i == 0x80000002)
{
memcpy( CPUBrandString,
CPUInfo,
sizeof(CPUInfo));
}
else if( i == 0x80000003 )
{
memcpy( CPUBrandString + 16,
CPUInfo,
sizeof(CPUInfo));
}
else if( i == 0x80000004 )
{
memcpy(CPUBrandString + 32, CPUInfo, sizeof(CPUInfo));
}
}
CString s = CPUBrandString;
s.TrimLeft(); s.TrimRight();
return s;
}
|
|
|
|
|

|
I really enjoied (sp??) your library , but there is a problem
in the identification code, i have a quad core and it doesn't detect
it, the name is unknown and it doesn't detect the cache on board.
Also misses some features i know i ahve mounted on the chip.
Is there any chance to see the windows version ?
in the download is present only the linux version
|
|
|
|

|
Hi all,
Can any body tell me whether the camel identification tool is available for 64-bit windows.
|
|
|
|

|
Hi, Iain!
I would like to use your code on a commercial software, which won't be licenced under GPL. So, is there any possibility to use your code under some other licence? (Some authors sell also commercial licences for GPL code, i.e. http://www.artpol-software.com/Purchase.aspx[^] )
Thanks for answer!
Regards,
Jaakko
|
|
|
|

|
Hello,
I have code like what you have shown in Camel, using the CPUID instruction, to detect the type of CPU the program is running on (under Win32 and Linux). But I have not been able to find out how to detect the number of physical and / or logical CPUs present in the system. Could you provide any hints on how you can do this?
Thanks in advance and best regards.
Gonzalo Diethelm
|
|
|
|
|

|
hi,
i am working on a project wherein i need to retrieve the cpu power management information.
Can I use your code?
Also if you could help me by telling is there any way to retrieve CPU temp by using your code, it will be really wonderful.
Please help.
Thanks,
Manasi
|
|
|
|

|
Hi!
How is it possible to identify different cores on dual or quad core cpus?
thx.
juergen
|
|
|
|

|
Hi!
I want to write a small program (commandline-tool) to get the count of cpus, cores, HT,...
may I do it?
thx.
juergen
|
|
|
|

|
Hi,
I'm working on a library that uses opengl to create GUI-s based on text files and I need to detect the cpu features so I can write my assembly code.
For the moment is in alpha stage so the only link I can provide you is this http://sourceforge.net/projects/celui
So I need to use parts of your code probably that is why I'm asking for the permission.
all the best.
dacian
nothing is new only rediscovered
|
|
|
|

|
hi
i am doing project in my final semester. and i want to use this program to have the information.please send me code at rakeshsemilo@yahoo.com
|
|
|
|

|
I tried creating a VC6 project for Camel. Did "New Win32 App" (NOT console) and added all files to the respective folders ("Header Files", "Source Files", "Resource Files"). Then changed the "C Code generation" option: for Debug, set it to "Debug Multithreaded DLL"; for Release, set it to "Multithreaded DLL". Saved the project and hit "Rebuild All" with the default configuration, which is Debug; everything works and I end up with an executable that can be run without any problems.
If I now quit MSVC, restart it, reload my newly created project and hit "Rebuild All", everything compiles but the linker complains (the error code is LNK2001) that it cannot find "WinMain@16". What the hell? I have made ZERO changes to the source files or the project files!
Any hints are more than welcome. Thanks and best regards.
|
|
|
|

|
Ok so, I imported the code into VS2005 and compiled it into a DLL, but I can't seem to be able to use it in VB.NET... I add a reference to the DLL and I can declare a new variable with the type of CPUInfo, but it has no methods, only a few array methods... Apparently it is a structure not a class... still, that doesn't explain why it doesn't work :S
Any help would be appreciated
-- modified at 15:26 Sunday 22nd January, 2006
|
|
|
|

|
On some machines the CPU name comes back Pentium® III (0.13 µm) With 256 Or 512 KB On-Die L2 Cache. Some are Pentium® III (0.18 µm). Seems to be only a Pentium III problem.
Is there a way to convert it to a processor speed?
We're using it for customer bug reports. Some of our customers have very old machines.
Everything else is working great. Nice work, Ian.
Matt
|
|
|
|

|
Version.dwMajorVersion == 5 && Version.dwMinorVersion == 2 is Windows 2003
|
|
|
|

|
Hi
I'm wirting on at free application detection system information, but I have ran into som problems with the Level XX cache, my routines does not always detect ti correct, but youers does whork where mine do not.
I've got support for some more CPU stuff than you if interested, please send me an email
Jens Borrisholt
|
|
|
|

|
Iain,
I am doing a project for school, and I would like to use your cpu_info source. I'm writing a multi-track audio recording application, and I require having a delay in part of the applicaiton in order to synchronize sound playback & recording, and it looks like I'll need to adjust the delay based on computer speed. Your source would help.
Eric
|
|
|
|

|
Dear Iain,
Im doing a personal project which gets the system information. Will you please give me permission to use your CPU Identifier class in my Project ?
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|

|
Hello,
I am trying to detect if my Xeron SMT processor has L3 cache. My OS is Red Hed linux. Where can I get a version of camel for Linux?
Thanks
|
|
|
|

|
Hello
Congratulations. Your code is designed to find each processor with hyperthreading like 2 processors ?
I'm running it in a dual Xeon server (with hyperthreading) and Camel says that I have four processors. It do not would say that I have two processors with hyperthreading enabled in both ?
Thanks
|
|
|
|

|
Hi,
Is there a way to find out the data and/or instruction cache line lengths and associativity? This can be very helpful when optimizing code, e.g. loop unrolling.
WCPUID can show it so it must be in there somewhere.
Thanks a lot,
Adi
|
|
|
|

|
I have Celeron 333 and, al least for Debug Build, your software identifies it as Generic Pentium 2 333 or 585 or 266. What is the problem?
|
|
|
|

|
I am so sorry that I can't get the CPU ID number. How to get it?
===========================
Nothing to say, Just do it!
|
|
|
|

|
Dear Sir,
I m doing my final year project, and i want the code for getting Processor's Serial no. this is really a non-commercial study project. I want to generate a serial key for my software's protection. Kindly sent me the code at kashi_mughal@yahoo.com
Thanking u in anticipation.
Kashif.
|
|
|
|

|
Hi,
I have just downloaded your code as I am interested in doing something similar for my 3rd year dissertation. The demo version of the software loads fine and detects my 2800+ just fine. However when i downloaded the source code i couldn't get it to compile. It give me the following error that i am hoping you might be able to shed some light on,
Thanks,
Matt
--------------------Configuration: cpu_info - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/cpu_info.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
cpu_info.exe - 2 error(s), 0 warning(s)
|
|
|
|
|

|
I have P4 2.4c. But camel says that my processor has no HT capability.
How do you think about this bug?
|
|
|
|

|
I noticed that while running Camel, my Pentium 4 machine seems to have power saving and 3dnow instructions. This is due to the Features struct not being zero'd. The routines that check for the extended features throw or return, leaving the Features struct in an unitialized memory state.
Great work otherwise, thanks!
|
|
|
|

|
when i was compling your demo project, the following errors occurred:
error C2039: 'wProductType' : is not a member of '_OSVERSIONINFOEXA'
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
F:\camel_demo\winmain.cpp(608) : error C2065: 'VER_NT_WORKSTATION' : undeclared identifier
F:\camel_demo\winmain.cpp(609) : error C2039: 'wSuiteMask' : is not a member of '_OSVERSIONINFOEXA'
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
what is wrong?
|
|
|
|

|
Where do you get Vendor ID Device ID database to scan the PCI and get
the HW name ?
|
|
|
|

|
Can you explain me, why you use the __cdecl calling convention for some function that include assembler code?
Daniel
---------------------------
Never change a running system!
|
|
|
|

|
Instead of showing info about all CPU in dialog I am writing it to ini file. But I found that the thread doesn't write CPU info to disk until I close my application.
|
|
|
|

|
ok so why won't you release the whole thing? are you planning on making a commerical app? are you planning on just selling it to commercial entities? what's the big plan?
|
|
|
|

|
Very nice application. It reports 4 processors on my dual Pentium 4 Xeon machine though. I'm sure there are only 2
Device manager shows 2 but Camel shows 4.
Thanks for posting it.
|
|
|
|

|
All the functions:
GetTypeID ();
GetFamilyID ();
GetModelID ();
GetSteppingCode ();
allocate memory which are never freed. I have changed these functions to return the value as an integer. I think it is the callers responsibility to format these
|
|
|
|

|
I have tested this library on some machines, and it seems very nice. But on an old i486/40MHz the calculations takes a very long time (30-60s). I have found that it's the speed calculating loop that takes a long time (in the function RetrieveClassicalCPUClockSpeed). Changing the constant CLASSICAL_CPU_FREQ_LOOP to a smaller value increases the speed calculation.
But then the calculated speed is saved but not used. Adding a line fixes it:
int CPUInfo::GetProcessorClockFrequency ()
{
// Return the processor clock frequency.
if (Speed != NULL)
return Speed->CPUSpeedInMHz;
else if (Features.CPUSpeed > 0)
return Features.CPUSpeed;
else
// Display the error condition.
return -1;
}
|
|
|
|

|
First off, this is very nice work. It has come in very handy for me.
I found a very small memory leak in it. In the CPUInfo class the variable CPUSpeed * Speed is constructed with new in the member function RetrieveCPUClockSpeed() but it is never destroyed. My fix for this was to set it NULL in the constructor of CPUInfo and to destroy it the destructor if it is not NULL.
The Ten Commandments For C Programmers
|
|
|
|

|
This is a complete CPU ID class!
Good work.
|
|
|
|

|
Having looked at some of the code for this work, all I will say, is that you have special talents for such an accomplishment. This, in addition to the serious efforts and hard work you put into making it happen.
Congratulation, and well done!!
William
|
|
|
|

|
it'ld be nice if it identified celerons instead of the generic "pentium II xxx" ids
|
|
|
|

|
how about making it an activex com control so it can be called from scripts and such. I could do it if you want although I suspect it's not going to be non-commerical for long
|
|
|
|
|

|
Thanks for the cool code, but there is a problem in your code. I ran it on my desktop (Pentium 3) and it said my computer has 3DNow! and 3DNow!+
Same goes with my laptop which is an Intel Pentium 3-M as well.
I will try to look at the code and see where the problem is!
If anybody has any idea, please let me know!
Cheers!
|
|
|
|
 |