ll_libload kernel, "kernel32.dll"
ll_getproc GetVersionEx, "GetVersionExA", kernel
#module
#deffunc getosver int
mref type, 0
mref stt, 64
mref rstr, 65
dim i, 37 // OSVERSIONINFO構造体
i = 148
ll_getptr i : ll_ret prm
ll_callfunc prm, 1, GetVersionEx@
stt = i.4
if type = 0 : return
if i.4 = 2 : rstr = "NT " : else : rstr = "" // VER_PLATFORM_WIN32_NT
rstr += "" + i.1
if type > 1 : rstr += "." + i.2
if type > 2 : rstr += "." + i.3
if type > 3 {
rstr += " "
repeat 32, 5
strlen i.1, rstr
wpoke rstr, i.1 + 0, i.cnt & 0xFFFF
wpoke rstr, i.1 + 2, i.cnt >> 16
loop
}
return
#global
sdim pf, 8, 3
pf = "−−", "9X", "NT"
getosver 4
mes "使用OSは" + pf.stat + "系の「" + refstr + "」です"
stop
|