From: sandiego on
Hi everybody,

i was told that i should ask my question here, cause here are some more
skilled people :)

What i want to do is to read as much hardware information as possible
from the actual system.

What i already implemented is this:

- read descriptors from CPU
- CPUID stuff
- Registry-Information (Bios, IDs etc.)
- Harddrive

I got structure SYSTEM_INFO and HW_PROFILE_INFOA.

What i want to get is this:

- Is there 3D-Support for the graphics Adapter (just a yes or no)
- HDD Vendor
- CDROM Vendor
- Temperatures of cpu, hdd, mainboad...
- RAM-Timings
- MBR and Partition Table

Everything in pure C. Not c++ or c# sorry,. i just learned C and want to
stick with it.

If anybody can help me i would really appreciate it. But i hope you know
that if i get just a Name like GetAllHwInfos() i dont know how to use it
So if there are any codesamples i would please you to post them.

Thanks a lot!!

sandiego.
From: Charlie Gibbs on
In article <gg26fr$485$1(a)aioe.org>, "sandiego_f[AT]"@gmx.de (sandiego)
writes:

> What i want to get is this:
>
> - Is there 3D-Support for the graphics Adapter (just a yes or no)
> - HDD Vendor
> - CDROM Vendor
> - Temperatures of cpu, hdd, mainboad...
> - RAM-Timings
> - MBR and Partition Table

There's a heck of a lot stuff available from WMI classes
(e.g. Win32_PhysicalMedia).

> Everything in pure C. Not c++ or c# sorry,. i just learned C and
> want to stick with it.

You'll need to use COM to access the WMI classes. Unfortunately,
nearly every guide to using COM is oriented toward C++ or Visual
Basic. It's very hard to find information on accessing COM from
straight C.

Fortunately, I've already done the legwork, and found an excellent
set of articles by Jeff Glatt entitled "COM in plain C". You can
find the first one at http://www.codeproject.com/com/com_in_c1.aspx -
google for "Jeff Glatt" "COM in plain C" for links to the whole series.

--
/~\ cgibbs(a)kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!

From: shreyas on
I think you could do most of those low level stuff using BIOS.Try
finding a library that can call BIOS functions,interrupt calls rather.
INT 13h reads raw disk(HDD). MBR will be in the first sector of the
hard disk that is the first 512 bytes of the disk.The partition table
follows the MBR.


From: Nico on
Charlie Gibbs wrote:
> In article <gg26fr$485$1(a)aioe.org>, "sandiego_f[AT]"@gmx.de (sandiego)
> writes:
>
>> What i want to get is this:
>>
>> - Is there 3D-Support for the graphics Adapter (just a yes or no)
>> - HDD Vendor
>> - CDROM Vendor
>> - Temperatures of cpu, hdd, mainboad...
>> - RAM-Timings
>> - MBR and Partition Table
>
> There's a heck of a lot stuff available from WMI classes
> (e.g. Win32_PhysicalMedia).
>
>> Everything in pure C. Not c++ or c# sorry,. i just learned C and
>> want to stick with it.
>
> You'll need to use COM to access the WMI classes. Unfortunately,
> nearly every guide to using COM is oriented toward C++ or Visual
> Basic. It's very hard to find information on accessing COM from
> straight C.

See MSDN, it's about the same code in C or C++ :
http://msdn.microsoft.com/en-us/library/aa390418(VS.85).aspx
From: Christian ASTOR on
sandiego wrote:

> What i want to get is this:
>
> - Is there 3D-Support for the graphics Adapter (just a yes or no)

You can test creation of a D3D Device

> - HDD Vendor
> - CDROM Vendor

IOCTL_STORAGE_QUERY_PROPERTY or
IOCTL_SCSI_GET_INQUIRY_DATA or IOCTL_SCSI_PASS_THROUGH

> - Temperatures of cpu, hdd, mainboad...

By reading the SMBIOS Tables with, e.g., WmiQueryAllData()

> - MBR and Partition Table

CreateFile()-ReadFile() + IOCTL_DISK_GET_DRIVE_LAYOUT_EX