Getting CPU and Graphics Card

Archives Forums/Win32 Discussion/Getting CPU and Graphics Card

agent4125(Posted 2007) [#1]
In order to automate part of technical support, I'd like to dynamically grab the user's CPU and graphics card information.

I tried looking through the reference on MSDN but I'm afraid I am still new to Win32 programming. I could probably get what I need through WMI (e.g. Win32_Processor & Win32_VideoController) if I knew how to access that through BlitzMax.

Any help would be greatly appreciated.

Joe


EOF(Posted 2007) [#2]
BlitzMax code which gets CPU info and O/S details too
(not sure if everything here is right though):




agent4125(Posted 2007) [#3]
Thanks! I was originally looking at GetSystemInfo too, but I think some of the fields are mixed up in your code.

Here's my output for a P4, 2.4 GHz:


_______________________________________________________

processor architech: 0
           reserved: 4096
           pagesize: 65536
       min app addr: 2147418111
       max app addr: 1
     processor mask: 1
     num processors: 586
     processor type: 65536
             allocg: 33816591
    processor level: 0
 processor revision: 0

_______________________________________________________

Operating System: Windows NT 

         Version: 5.1
           Build: 2600
_______________________________________________________

Processor unknown
_______________________________________________________



xlsior(Posted 2007) [#4]
AMD Athlon 2800+:

processor architech: 0
reserved: 4096
pagesize: 65536
min app addr: 2147418111
max app addr: 1
processor mask: 1
num processors: 586
processor type: 65536
allocg: 167772166
processor level: 0
processor revision: 0

_______________________________________________________
Operating System: Windows NT
Version: 5.1
Build: 2600
_______________________________________________________
Processor unknown


(Of course the code doesn't seem to recognize any AMD CPU's)


Filax(Posted 2007) [#5]
_______________________________________________________
processor architech: 0
reserved: 4096
pagesize: 65536
min app addr: 2147418111
max app addr: 3
processor mask: 2
num processors: 586
processor type: 65536
allocg: 252313606
processor level: 0
processor revision: 0

_______________________________________________________
Operating System: Windows NT
Version: 6.0
Build: 6000
_______________________________________________________
Processor unknown
_______________________________________________________


Hotshot2005(Posted 2007) [#6]
Core 2 duo E6750 wit 2GB Ram

Building untitled1
Compiling:untitled1.bmx
flat assembler version 1.66
4 passes, 19574 bytes.
Linking:untitled1.debug.exe
Executing:untitled1.debug.exe
_______________________________________________________
processor architech: 0
reserved: 4096
pagesize: 65536
min app addr: 2147418111
max app addr: 3
processor mask: 2
num processors: 586
processor type: 65536
allocg: 252379142
processor level: 0
processor revision: 0

_______________________________________________________
Operating System: Windows NT
Version: 5.1
Build: 2600
_______________________________________________________
Processor unknown
_______________________________________________________

Process complete


xlsior(Posted 2007) [#7]
Here's a link to one that I put together a few months ago:

http://www.blitzmax.com/codearcs/codearcs.php?code=2114

It outputs the following info, although the video information only works for ATI adapters...

Number of CPUs/cores: 2
CPU Speed in MHz : 2400
CPU Name String : Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
CPU Identifier : x86 Family 6 Model 15 Stepping 6
Vendor Identifier : GenuineIntel

ATI Video Adapter : Radeon X1650 Series (0x00000000)
Board Manufacturer : Hightech Information System Ltd. (0x000017af)
ATI Device ID : 7291 (0x00007291)
ATI BIOS Date : 01/01/07 (0x00010107)
ATI Chip ID : RV560 (0x00000171)
ATI 2D Driver : 6.14.10.6641 (0x00000000)
ATI D3D Driver : 6.14.10.440 (0x00000000)
ATI OGL Driver : 6.14.10.6120 (0x00000000)
ATI Bus Type : PCI Express x16 (0x00000010)
ATI Memory Size : 256 MB (0x00000200)
ATI Memory Type : DDR3 (0x00000000)
DirectX Version : 9.0c (0x09000000)