|
Hi,
How can I use the SysInfo.dll with an ANSI C executable ?
=> How to convert .h to be ANSI C compliant and used by ANSI C exe source code ?
If someone already done this task, please contact or post here !
Thanks for your precious help !
|
|
|
|
|
Hi,
Would it be possible to precise the licence for this article?
This is increasingly necessary if source code is to used in another product (commercial or not)!
Regards
Frederic
|
|
|
|
|
Please provide me Visual C++ code that tell which hard drive is primary master, which is primary slave, which is secondary master and which one is secondary slave.
I really need that. Thanks in advance.
|
|
|
|
|
Hello sir,
First of all i would like to thank you for posting such a wonderful article with a code of great modularity.
I am developing an application to retrieve all hardware information as much as it is possible.Can you mail me revised version which includes information about motherboard,keyboard,mouse,PCI,ISA cards,network cards,usb devices,serial ports,parrelel ports etc..
Can u suggest me the books through which i can learn all these things?
Your help will be greatly helpful to me.
Thank you again.
Dhiren.
|
|
|
|
|
When this was written, many years ago, there was no built-in support for determining a lot of this stuff with an easy-to-use API. Nowadays, that's not entirely true and I feel there are probably better ways to do a lot of this. There's a motherboard/CPU detection library free for the taking [as far as I know]; check out CPU-Z.
The main reason I stopped working on this is that WMI provides most, if not all, of this information and since Windows 2000, this is on every Windows machine. So, check out WMI for your hardware-detection needs.
The best part of this project is that it can be used as a demonstration for how to wrap inline assembly into function calls so that the __asm doesn't have to be looked at by people who'd get confused by it [like me ].
|
|
|
|
|
Thank you sir,
I have already tried WMI to find all these information,but some information like-motherboard's manufacturer,version no.,serial no.,HDD's serial no.,revision no.,Floppy drive's serial no,manufacturer. etc. are not reliable through WMI. It doesn't give consistency in performance in large network. so can u suggest me some other way to look through??I want the direction to get ahead only.
Thanking you.
Waiting for reply.
Dhiren.
|
|
|
|
|
Sorry, I don't know of a way to get the things you need. I know CPU-Z gets some of it, but not all. I've seen posts on here and CodeGuru regarding getting a hard drive's serial #.
Good luck to you.
|
|
|
|
|
SysInfoTester.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall SysInfo::getCpuSpeed(void)const " (__imp_?getCpuS
peed@SysInfo@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
SysInfoTester.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall SysInfo::getCpuIdentification(void)const " (__imp
_?getCpuIdentification@SysInfo@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
SysInfoTester.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall SysInfo::SysInfo(bool const &,unsigned int const &,int const &,int const &)" (__imp_??0SysInfo@@QAE@AB_NABIABH2@Z)
Debug/SysInfoTester.exe : fatal error LNK1120: 26 unresolved externals
Error executing link.exe.
SysInfoTester.exe - 27 error(s), 0 warning(s)
That is just 2 of the 27... all I have to say "What is going on guys?"
|
|
|
|
|
Hello,
i think there is a bug on free Network Space
Name: R:\ Type: Fixed drive Total: 114.46 GB Free: 5.11 GB
Name: T:\ Type: Network drive Total: 488.28 MB Free: 226.75 GB
That must be MB
Jimmy
|
|
|
|
|
hi,
anyone know how to retrieve system information of remote client in a network.
Pradeep
|
|
|
|
|
|
HI
I love C++ programming, but I just started to do Win32 and MFC programming right now. This program is very impressive (great moduality). I like to write something to retrieve system information as well. Could you tell me where should I started. Could you tell me the following:
1. what reference books did you use? Any recommedation for what references book should I use.
2. Since MFC is just OOP version of Win32, ,is it possible/should it be faster if I use MFC classes instead of Win32 ?
3. Is there any good newsgroup for Win32 and MFC programming?
4. I tried to compile with Visual Studio 7.0, but it failed; but I was able to run under VStudio 6.0; Why is that?
Thank You for you helps
Best Regards
Edward
|
|
|
|
|
Are you planning to add support for new processors like Pentium 4, Athlon XP...
Regards
|
|
|
|
|
how can we retrive the remote system information
please.....
|
|
|
|
|
Thanks.. I liked this
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]
"It's The Soapbox; topics are optional" Shog 9
|
|
|
|
|
Hi,
I read the source code but I do not understand what CPUID means
Example:
DWORD dwSignature = 0;
DWORD dwFeatureEbx = 0;
DWORD dwFeatureEcx = 0 ;
DWORD dwFeatures = 0;
__asm
{
mov eax, 1
CPUID
mov [dwSignature], eax // store CPU signature
mov [dwFeatureEbx], ebx
mov [dwFeatureEcx], ecx
mov [dwFeatures], edx // features
}
Anyone knows where to find document about CPUID?
Thank alot
|
|
|
|
|
This is really late, but CPUID is a processor instruction and information can be found for it at the intel site or just search the internet.
|
|
|
|
|
Hi.
I also cannot compile and link the program - but I'm almost there. Do you think that a new version of the code could be posted, which is directly compilable with Visual C++? Or if someone could mail it to me as an attachment to richardcavell@mail.com, it would be much appreciated.
|
|
|
|
|
This code is directly compatible with Visual C++; it's just that I required people to fully understand the link process in order to get everything working ... which really isn't a good practice to get into; a library's use should be a little more seemless, I admit. I DO have a newer version where both projects reside in the same workspace and the dependencies are set up properly, however it is at my home. I will e-mail you the newer stuff later on.
Once I spend the time to figure out how to update the source here, I will do so.
--Paul
|
|
|
|
|
Hi!
How can I get information about the CPU load (usage), the number of CPUs that are plugged in, the amount of free and total memory, ...?
Many thanx in advance
Tom
|
|
|
|
|
As far as CPU load is concerned, I have not added that functionality as of
yet because the way to do it in Win9x/ME is different than it is for WinNT. I've wanted to do it for some time; maybe I'll get around to it. The other things you ask for are implemented by this class I provided. Here are the commands:
int main(int argc, char* argv[])
{
SysInfo sysInfo;
cout << "---------------------" << endl;
cout << "PROCESSOR INFORMATION" << endl;
cout << "---------------------" << endl;
cout << "CPU String: " << sysInfo.getCpuIdentification() << endl;
cout << "CPU Speed: " << sysInfo.getCpuSpeed() << endl;
cout << "Number of CPUs: " << sysInfo.getNumProcessors() << endl;
cout << "Family: " << sysInfo.getCpuFamily() << endl;
cout << "Model: " << sysInfo.getCpuModel() << endl;
cout << "Stepping: " << sysInfo.getCpuStepping() << endl;
cout << "------------------" << endl;
cout << "MEMORY INFORMATION" << endl;
cout << "------------------" << endl;
cout << "Total: " << sysInfo.getTotalRam() << endl;
cout << "Available: " << sysInfo.getAvailRam() << endl;
cout << "Total Page: " << sysInfo.getTotalPageFile() << endl;
cout << "Avail Page: " << sysInfo.getAvailPageFile() << endl;
cout << "Total Virtual: " << sysInfo.getTotalVirtual() << endl;
cout << "Avail Virtual: " << sysInfo.getAvailVirtual() << endl;
return (0);
}
I've fixed a few bugs since I released this a few months ago, so e-mail me if you'd like the updated version. I'll try to get around to that load usage stuff, too. It's hard to find incentive to do these things when I, myself, don't need them because I have other things going on
|
|
|
|
|
void hardware_info()
{
SYSTEM_INFO siSysInfo;
// Copy the hardware information to the SYSTEM_INFO structure.
GetSystemInfo(&siSysInfo);
// Display the contents of the SYSTEM_INFO structure.
printf("Hardware information: \n");
printf(" OEM ID: %u\n", siSysInfo.dwOemId);
printf(" Number of processors: %u\n",
siSysInfo.dwNumberOfProcessors);
printf(" Page size: %u\n", siSysInfo.dwPageSize);
printf(" Processor type: %u\n", siSysInfo.dwProcessorType);
printf(" Minimum application address: %lx\n",
siSysInfo.lpMinimumApplicationAddress);
printf(" Maximum application address: %lx\n",
siSysInfo.lpMaximumApplicationAddress);
printf(" Active processor mask: %u\n",
siSysInfo.dwActiveProcessorMask);
}
void version_number()
{
DWORD dwVersion = 0;
DWORD dwMajorVersion = 0;
DWORD dwMinorVersion = 0;
DWORD dwBuild = 0;
dwVersion = GetVersion();
// Get the Windows version.
dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
// Get the build number.
if (dwVersion < 0x80000000)
dwBuild = (DWORD)(HIWORD(dwVersion));
printf("Version Number is %d.%d (%d)\n",
dwMajorVersion,
dwMinorVersion,
dwBuild);
}
#define DIV 1024
// Specify the width of the field in which to print the numbers.
// The asterisk in the format specifier "%*I64d" takes an integer
// argument and uses it to pad and right justify the number.
#define WIDTH 7
void memory_info()
{
MEMORYSTATUSEX statex;
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
printf ("There is %*ld percent of memory in use.\n",
WIDTH, statex.dwMemoryLoad);
printf ("There are %*I64d total Kbytes of physical memory.\n",
WIDTH, statex.ullTotalPhys/DIV);
printf ("There are %*I64d free Kbytes of physical memory.\n",
WIDTH, statex.ullAvailPhys/DIV);
printf ("There are %*I64d total Kbytes of paging file.\n",
WIDTH, statex.ullTotalPageFile/DIV);
printf ("There are %*I64d free Kbytes of paging file.\n",
WIDTH, statex.ullAvailPageFile/DIV);
printf ("There are %*I64d total Kbytes of virtual memory.\n",
WIDTH, statex.ullTotalVirtual/DIV);
printf ("There are %*I64d free Kbytes of virtual memory.\n",
WIDTH, statex.ullAvailVirtual/DIV);
// Show the amount of extended memory available.
printf ("There are %*I64d free Kbytes of extended memory.\n",
WIDTH, statex.ullAvailExtendedVirtual/DIV);
}
|
|
|
|
|
sir,
it would be more greatly appreciated if you add these features:
- Detect Lan Adapters with it Manufacturers Name and Model...
- Detct Motherboard with Manufacturers name
- Detect Display Monitor With Manufacturers Name
- Detect Keyboard and Mouse
- Detect Display Adapter with manufacturers Name
- and lastly it will detect other PCI and ISA devices installed...
hope it will come out in the next release..
i just love your stuff....
thanks
xjhay
xjhay
|
|
|
|
|
Hi,
Can you please explain how should I compile this program? I pretty exhaustive and I dont know why we are having two zip files one for testing and one for source. I have used the source zip file to create a dll, it works fine and compiles without any errors. But when I am compiling the tester code, it says:
Compiling...
SysInfoTester.cpp
Linking...
LINK : fatal error LNK1104: cannot open file "SysInfo.lib"
Error executing link.exe.
SysInfoTester.exe - 1 error(s), 0 warning(s)
Can anyone tell me how to solve this.
Suren.
|
|
|
|
|
Hi All,
I cannot link it too... Please help..
Yacx.
|
|
|
|
|