flat assembler
Message board for the users of flat assembler.
Index
> Windows > HOW DO YOU GET SYSTEM INFO? |
Author |
|
Reverend 03 May 2005, 11:59
1. OS info
Call GetVersionEx and you have everything in OSVERSIONINFO structure 2. Memory info Call GlobalMemoryStatus and you have everything in MEMORYSTATUS structure 3. Drive info
|
|||
03 May 2005, 11:59 |
|
Redragon 03 May 2005, 22:01
how would you go about using that?
|
|||
03 May 2005, 22:01 |
|
mike.dld 03 May 2005, 22:53
SystemParametersInfo and GetSystemMetrics are cool funcs too
|
|||
03 May 2005, 22:53 |
|
coconut 03 May 2005, 23:01
pretty easy. define your variable for structure
Code: osver OSVERSIONINFOEX then you do your Code:
invoke GetVersionEx,osver
now the osver structure is filled with different data about os version. you could do something like Code: cmp dword [osver.dwPlatformId],VER_PLATFORM_WIN32_NT je winnt_platform ;if jump youre on nt platform, if no jump youre on win 9x/me platform then you compare major/minor version info to get exact os version. this article here shows you the exact version numbers for different windows: http://www.codeguru.com/Cpp/misc/misc/system/article.php/c8973/ see msdn for exact details on the OSVERSIONINFOEX structure: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/osversioninfo_str.asp the other APIs listed by Reverend work similarly |
|||
03 May 2005, 23:01 |
|
Redragon 04 May 2005, 00:06
i tried the "osver OSVERSIONINFOEX" but it didnt work, is there some othe rway i have to define it other than that?
|
|||
04 May 2005, 00:06 |
|
Reverend 04 May 2005, 19:20
Redragon wrote: i tried the "osver OSVERSIONINFOEX" but it didnt work, is there some othe rway i have to define it other than that? Have you included kernel32.inc from equates directory? The structure itself is defined there, and the compiler must first process this include file |
|||
04 May 2005, 19:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.