où pourrais-je trouver les informations sur l'OS (nom, type : NT/Normal, version) dans la base de registres ???
MAX_BAUD
tu peux te servir de regedit pour aller chercher ce que tu veux
avecles fonctions RegOpenKeyEx (HKEY_USERS , param.CheminVersion, 0, KEY_QUERY_VALUE, &hKey);...
c'est assez simple!!!
ceyquem
ça veut donc dire que si on a : OS = Windows NT on aura du 2000 ou xp et sinon on aura 95/98...
Merci beaucoup !
Ventilo
Sous WindowsXP pro:
OS: Windows NT
Win Version: 5.1
Build: 2600
ceyquem
up!
ceyquem
Je viens en effet de trouver ceci :
-----------------------------------
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Sub Form_Load()
Dim OSInfo As OSVERSIONINFO, PId As String
'KPD-Team 1998
'URL: http://www.allapi.net/ 'KPDTeam@Allapi.net
'Set the graphical mode to persistent
Me.AutoRedraw = True
'Set the structure size
OSInfo.dwOSVersionInfoSize = Len(OSInfo)
'Get the Windows version
Ret& = GetVersionEx(OSInfo)
'Chack for errors
If Ret& = 0 Then MsgBox "Error Getting Version Information": Exit Sub
'Print the information to the form
Select Case OSInfo.dwPlatformId
Case 0
PId = "Windows 32s "
Case 1
PId = "Windows 95/98"
Case 2
PId = "Windows NT "
End Select
Print "OS: " + PId
Print "Win version:" + str$(OSInfo.dwMajorVersion) + "." + LTrim(str(OSInfo.dwMinorVersion))
Print "Build: " + str(OSInfo.dwBuildNumber)
End Sub
--------------------------
Question : quel est le résultat sous Windows 2000 et XP ???
il faudrait que je sois capable de distinguer les deux types d'os :
95/98/Me et 2000/xp
ceyquem
Bonjour,
comment peut-on (API ou autre) savoir quel type d'os est utilisé à savoir entre deux catégories :