So... What -is- the Fix for XP?
The example mentioned above works without problems on windows 2000, but I currently don't have access to either Win98 or XP.
However, if there is a definite way to make it work under Win98 as well as XP, at least it won't be the end of the world: I don't remember who wrote it, but I ran across the following code a while ago:
Or more detailed, without userlibs:
The example mentioned above works without problems on windows 2000, but I currently don't have access to either Win98 or XP.
However, if there is a definite way to make it work under Win98 as well as XP, at least it won't be the end of the world: I don't remember who wrote it, but I ran across the following code a while ago:
; Userlib declaration ;.lib "Kernel32.dll" ;GetVersionEx%(VersionInfo*):"GetVersionExA" ; Blitz code for querying platform Version = CreateBank(148) PokeInt(Version, 0, BankSize(Version)) If GetVersionEx(Version) Then Select PeekInt(Version, 16) Case 0 : Notify "You are running Windows 3.1" Case 1 : Notify "You are running on the Windows 9x kernel" Case 2 : Notify "You are running on the Windows NT kernel" Default : Notify "Unexpected value for Platform ID.", True End Select Else Notify "There was an error querying version info.", True EndIf
Or more detailed, without userlibs:
OS$=GetEnv("OS") root$=GetEnv("systemroot") appdata$=GetEnv("AppData") If OS$="Windows_NT" then print "You are running the Windows NT kernel" If OS$="Windows_NT" And (Instr(root$,"WINNT")<>0) And AppData$<>"" Then Print "Probably Windows 2000" If OS$="Windows_NT" And (Instr(root$,"WINDOWS")<>0) And AppData<>"" Then Print "Probably Windows XP or Windows 2003" If OS$="Windows_NT" And AppData$="" Then Print "Probably Windows NT" If OS$="" Then Print "Windows 9x"