CLASE TSystemInfo

CLASE TSystemInfo

Postby MOISES » Wed Jan 29, 2020 10:12 am

Hola:

¿Existe alguna versión más actualizada y que funcione con los últimos sistemas operativos?

Gracias.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: CLASE TSystemInfo

Postby hmpaquito » Wed Jan 29, 2020 10:19 am

Quizá la actualización del método WinVer() sea suficiente


Code: Select all  Expand view  RUN
METHOD WinVer() Class TSystemInfo

   Local cVersion := ""
 
   Do Case
   Case ::IsWin95()         ; cVersion := "Windows 95"
   Case ::IsWin95SP1()      ; cVersion := "Windows 95 Service Pack 1"
   Case ::IsWin95OSR2()     ; cVersion := "Windows 95 OSR2"
   Case ::IsWin98()         ; cVersion := "Windows 98"
   Case ::IsWin98SP1()      ; cVersion := "Windows 98 Service Pack 1"
   Case ::IsWin98SE()       ; cVersion := "Windows 98 Second Edition"
   Case ::IsWinME()         ; cVersion := "Windows ME"
   Case ::IsWinNT31()       ; cVersion := "Windows NT 3.1"
   Case ::IsWinNT35()       ; cVersion := "Windows NT 3.5"
   Case ::IsWinNT351()      ; cVersion := "Windows NT 3.51"
   Case ::IsWinNT4()        ; cVersion := "Windows NT 4"
   Case ::IsWin2000()       ; cVersion := "Windows 2000" + If( ::IsWin2000Prof(), " Professional", If( ::IsWin2000Server(), " Server", "" ) )  //+ " " + ::cSP + " build " + LTrim( Str( ::nBuild ) )
   Case ::IsWinXP()         ; cVersion := "Windows XP " + If( lAnd( ::wSteMask, 512 ), "Home Edition", "Professional" )
   Case ::IsWin2003Server() ; cVersion := "Windows Server 2003"
   Case IsWinVista() ; cVersion := "Windows Vista"
   Case IsWin7() ; cVersion := "Windows 7"
   Case IsWin8() ; cVersion := "Windows 8"
   Case IsWindows10() ; cVersion := "Windows 10"
   Otherwise                ; cVersion := "Unknown Windows version"
   EndCase

   cVersion += IF( IsWin64(), " 64 ", " 32 " ) + "Bits"

Return cVersion


Fuente: viewtopic.php?p=185645#p185646
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests