Hi @ all ... here's a nice little "Get current Windows version" code which shows you that there's no extra DLL needed
` Get Windows Version Code (c) by Hubdule @ Color Arts 2003
` http://www.colorarts.de
` Init DBPro
Sync On
Sync Rate 0
` ############################################################# Start
` Get Windows Version Function
` First create a memblock with the size of 148 bytes
MAKE MEMBLOCK 1,148
` Get the memblock Pointer
MemPTR=GET MEMBLOCK PTR(1)
` And write the size of the block at the first position
WRITE MEMBLOCK DWORD 1,0,148
` Load Kernel32 and call GetVersionExA and point it's output to the
` memblock pointer :)
LOAD DLL "Kernel32",1
CALL DLL 1,"GetVersionExA",MemPTR
DELETE DLL 1
` Now read the memblock values ...
OSVersionInfoSize=MEMBLOCK DWORD(1,0)
OSMajorVersion=MEMBLOCK DWORD(1,4)
OSMinorVersion=MEMBLOCK DWORD(1,8)
OSBuildNumber=MEMBLOCK DWORD(1,12)
OSPlatformID=MEMBLOCK DWORD(1,16)
OSCSDVersion$=""
for i=0 to 127
OSCSDVersion$=OSCSDVersion$+chr$(MEMBLOCK BYTE(1,20+i))
next i
DELETE MEMBLOCK 1
` ############################################################# End
` And print out all values needed :D
Set Cursor 0,0
Print "OS Version Info size: "+str$(OSVersionInfoSize)
Print "OS Major Version: "+str$(OSMajorVersion)
Print "OS Minor Version: "+str$(OSMinorVersion)
Print "OS Build Number: "+str$(OSBuildNumber)
Print "OS Platform ID: "+str$(OSPlatformID)
Print "OS CSDVersion String: "+OSCSDVersion$
Select OSPlatformID
` Windows 9x/Me Versions
case 1
If OSMinorVersion=0 then Print "You use Windows 95"
If OSMinorVersion=10 then Print "You use Windows 98"
If OSMinorVersion>10 then Print "You use Windows ME"
endcase
` Windows NT/2000/XP Versions
case 2
IF OSMajorVersion=3 then Print "You use Windows NT 3.x"
IF OSMajorVersion=4 then Print "You use Windows NT 4.x"
IF OSMajorVersion=5 and OSMinorVersion=0 then Print "You use Windows 2000"
IF OSMajorVersion=5 and OSMinorVersion=1 then Print "You use Windows XP"
IF OSMajorVersion=5 and OSMinorVersion>1 then Print "You use an unknown Windows version"
IF len(OSCSDVersion$)>0 then print "This OS Version has "+OSCSDVersion$+" installed"
endcase
endselect
` Sync the current view
Sync
` Wait until key is pressed
Suspend for key
end