Page 1 of 1
Finding system specs (eg free RAM, etc)
Posted: Fri Mar 10, 2006 5:23 pm
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
Posted: Fri Mar 10, 2006 7:53 pm
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