Hi, we are working on a computer game and I'm writing the log file routines at the moment. I need to fetch the info about the following:
os,
processor type and speed,
video card.
So I thought I ask you guys at how this can be done in _asm. Currently it fetches info from the win.ini file, but it only works with windows 95/98/Me. Feedback would be appreciated.
I already looked at programmersheaven.com and searched the net but it's nearly impossible to pinpoint the right thing.
os,
processor type and speed,
video card.
So I thought I ask you guys at how this can be done in _asm. Currently it fetches info from the win.ini file, but it only works with windows 95/98/Me. Feedback would be appreciated.
I already looked at programmersheaven.com and searched the net but it's nearly impossible to pinpoint the right thing.
For the processor type information, use the API call GetSystemInfo. For the processor speed, check this link, which decribes either how to time the cpu yourself, or how to read the speed from the registry.
For determining the OS version, use the API function GetVersionEx.
For determining the OS version, use the API function GetVersionEx.
If someone has an api way to get the video card without the registry, I'm interested in the method! The only way I found (the most) reliable was to enum the registry from HKLM\Enum to get the "class"="Display" and get the "DeviceDesc" value.
I've done it in c, but not yet in asm. It's not well documented nor well coded, but if you are interested, just ask. I haven't found any api that works for all windows from 95 up to xp. What I tried worked fine on 95, 98, me, but I had some unicode problems on nt-2k. There are a bunch of other hardware info that can be obtained this way.
I've done it in c, but not yet in asm. It's not well documented nor well coded, but if you are interested, just ask. I haven't found any api that works for all windows from 95 up to xp. What I tried worked fine on 95, 98, me, but I had some unicode problems on nt-2k. There are a bunch of other hardware info that can be obtained this way.
take a look t this files : system.ini & win.ini
Maybe you can use setupapi.dll.Most of the prograsm which display hardware etc use this dll.You can get more infor from MSDN
Hope it helps.
Hope it helps.