Finding system specs (eg free RAM, etc)

Just starting out? Need help? Post your questions and find answers here.
cyberseth
New User
New User
Posts: 4
Joined: Sat Oct 11, 2003 8:30 am
Location: Doncaster, UK
Contact:

Finding system specs (eg free RAM, etc)

Post by cyberseth »

I'd like to write a little Windows support program in PureBasic to tag along with a game, and I need to find out a way to measure the user's current system. For example, enumerate the graphics devices, find out how much VRAM the computer has, whether it supports 3D graphics, what operating system it is running, etc etc....

Can anybody offer any tips on how to go about this?

Thanks,
Seth
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

for memory informations, all you need is here :

Code: Select all

; 32 bits

mem.MEMORYSTATUS
mem\dwLength = SizeOf(MEMORYSTATUS)

If GlobalMemoryStatus_(@mem)
  Debug mem\dwMemoryLoad
  Debug mem\dwTotalPhys
  Debug mem\dwAvailPhys
  Debug mem\dwTotalPageFile
  Debug mem\dwAvailPageFile
  Debug mem\dwTotalVirtual
  Debug mem\dwAvailVirtual
EndIf

; 64 bits

memex.MEMORYSTATUSEX
memex\dwLength = SizeOf(MEMORYSTATUSEX)

If GlobalMemoryStatusEx_(@memex)
  Debug memex\dwMemoryLoad
  Debug memex\ullTotalPhys
  Debug memex\ullAvailPhys
  Debug memex\ullTotalPageFile
  Debug memex\ullAvailPageFile
  Debug memex\ullTotalVirtual
  Debug memex\ullAvailVirtual
  Debug memex\ullAvailExtendedVirtual
EndIf
for CPU informations :
http://www.purebasic.fr/english/viewtop ... highlight=

for HardDisk informations :
http://www.purebasic.fr/english/viewtop ... t=harddisk
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Post Reply