OVH Cloud OVH Cloud

Os de l'appli

2 réponses
Avatar
Geko
Bonjour,

Comment savoir sur quel OS le client roule mon appli ?

Merci !

2 réponses

Avatar
François Picalausa
Bonjour/soir,

Tu peux le voir par l'API GetVersionEx:
http://msdn.microsoft.com/library/en-us/sysinfo/base/getversionex.asp

Déclarations:
Private Const VER_PLATFORM_WIN32_NT = 2
Private Const VER_PLATFORM_WIN32_WINDOWS = 1
Private Const VER_PLATFORM_WIN32s = 0

Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128 ' Maintenance string for PSS usage
End Type
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" _
( _
lpVersionInformation As OSVERSIONINFO _
) _
As Long

--
François Picalausa
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com


"Geko" a écrit dans le message de
news:06d901c3891b$eb8944f0$
Bonjour,

Comment savoir sur quel OS le client roule mon appli ?

Merci !


Avatar
Pierre Alexis
Salut François,

Tu as écrit :

Tu peux le voir par l'API GetVersionEx:
http://msdn.microsoft.com/library/en-us/sysinfo/base/getversionex.asp



N'oublions pas que (extrait de la MSDN) :

"If your application should run on Windows 2000 and later versions,
always use VerifyVersionInfo instead of GetVersionEx to check the system
version. Applications must use this technique to meet the Certified for
Windows 2000 application specification."

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/apcompat/apcompat/make_version_checking_compatible_with_future_operating_systems.asp?frame=true

--
Pierre ALEXIS - MVP Visual Basic
Courriel & messenger :
FAQ Visual Basic : http://faq.vb.free.fr/