| |
|
|
| Version Windows ermitteln sur API: KompilierenMarqueSéparation#################################
Windows-Version
Auslesen
#################################
Andreas Miethe * September 2003
#################################
Declare WinVer&,Winver$,WinVer!
Proc GetWinVersion
Declare OS#
Windows-Version ermitteln
DEF &Ver_Platform_Win32_Windows 1
DEF &Ver_Platform_Win32_NT 2
Struct OSVERSIONINFO = dwOSVersionInfoSize&,dwMajorVersion&,dwMinorVersion&,dwBuildNumber&,dwPlatformId &,szCSDVersion$(128)
Dim OS#,OSVERSIONINFO
OS#.dwOSVersionInfoSize& = 148
External(Kernel32,GetVersionExA,OS#)
LET Winver& = 8
If OS#.dwPlatformId& = &Ver_Platform_Win32_Windows
If OS#.dwMajorVersion& = 4
Case OS#.dwMinorVersion& = 0 : Winver& = 1
Case OS#.dwMinorVersion& = 10 : Winver& = 2
Case OS#.dwMinorVersion& = 90 : Winver& = 3
Endif
ElseIf OS#.dwPlatformId& = &Ver_Platform_Win32_NT
Case OS#.dwMajorVersion& = 3 : Winver& = 4
Case OS#.dwMajorVersion& = 4 : Winver& = 5
Case OS#.dwMajorVersion& = 5 : Winver& = 6
Case OS#.dwMinorVersion& = 1 : Winver& = 7
Endif
Dispose OS#
case WinVer& = 1: Let Winver$=Win95
case WinVer& = 2: Let Winver$=Win98
case WinVer& = 3: Let Winver$=WinME
case WinVer& = 4: Let Winver$=Win_NT_3.5
case WinVer& = 5: Let Winver$=Win_NT_4
case WinVer& = 6: Let Winver$=Win2000
case WinVer& = 7: Let Winver$=WinXP
case WinVer& = 8: Let Winver$=Win-Unbekannt
LET WINVER!=@VAL($WINVER)
CASE @or(WINVER&=4,Winver!=5) : LET WINVER!=5.01
EndProc
Getwinversion
Print WInVer$
waitinput
Vielen Dank Andreas!
Salve, iF. |
|
|
| |
|
|
|
Jac de Lad | et quelque chose erweitert: KompilierenMarqueSéparation#################################
Windows-Version
Auslesen
#################################
Andreas Miethe * September 2003
#################################
Declare Winver&,Winver$,Winver!
Proc Getwinversion
Declare Os#
Windows-Version ermitteln
Def &Ver_platform_win32_windows 1
Def &Ver_platform_win32_nt 2
Struct Osversioninfo = Dwosversioninfosize&,Dwmajorversion&,Dwminorversion&,Dwbuildnumber&,Dwplatformid &,Szcsdversion$(128)
Dim Os#,Osversioninfo
Os#.Dwosversioninfosize& = 148
External(Kernel32,GetVersionExA,Os#)
Let Winver& = 10
If Os#.Dwplatformid& = &Ver_platform_win32_windows
If Os#.Dwmajorversion& = 4
Case Os#.Dwminorversion& = 0 : Winver& = 1
Case Os#.Dwminorversion& = 10 : Winver& = 2
Case Os#.Dwminorversion& = 90 : Winver& = 3
Endif
Elseif Os#.Dwplatformid& = &Ver_platform_win32_nt
Case Os#.Dwmajorversion& = 3 : Winver& = 4
Case Os#.Dwmajorversion& = 4 : Winver& = 5
Case Os#.Dwmajorversion& = 5 : Winver& = 6
Case (Os#.Dwminorversion& = 1) & (WinVer&=6): Winver& = 7
Case Os#.Dwmajorversion& = 6 : Winver& = 8
Case (Os#.Dwminorversion& = 1) & (WinVer&=8): Winver& = 9
Endif
Dispose Os#
Case Winver& = 1: Let Winver$=Win95
Case Winver& = 2: Let Winver$=Win98
Case Winver& = 3: Let Winver$=WinME
Case Winver& = 4: Let Winver$=Win_NT_3.5
Case Winver& = 5: Let Winver$=Win_NT_4
Case Winver& = 6: Let Winver$=Win2000
Case Winver& = 7: Let Winver$=WinXP
Case Winver& = 8: Let Winver$=WinVista
Case Winver& = 9: Let Winver$=WinVistaSP1
Case Winver& = 10: Let Winver$=Win-Unbekannt
Let Winver!=@Val($Winver)
Case @Or(Winver&=4,Winver!=5) : Let Winver!=5.01
Endproc
Getwinversion
Print Winver$
Waitinput
je personnelle serait mais qui Ermittlung sur $WinVer bevorzugen (peux mais pas entre 95 et NT4 unterscheiden): KompilierenMarqueSéparation Jac |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 20.02.2008 ▲ |
|
|
|