Function IsWindows11

Function IsWindows11

Postby Giovany Vecchi » Fri Oct 14, 2022 3:27 pm

For now it is not a specific function to verify the presence of Windows 11. For those who need to verify this version, I made this temporary function.

Code: Select all  Expand view
function IsWindows11()
   local oReg := TReg32():New( HKEY_LOCAL_MACHINE,;
                               "SOFTWARE\Microsoft\Windows NT\CurrentVersion",;
                               .F. )
   local cProductName := oReg:Get( "ProductName" )
   Local lc_nCurrentBuild := Val(oReg:Get("CurrentBuildNumber"))
   Local lc_lRet11 := .F.

   oReg:Close()

   If "Windows 10" $ cProductName .and. lc_nCurrentBuild >= 22000
         lc_lRet11 := .T.
   EndIf

return lc_lRet11
 
User avatar
Giovany Vecchi
 
Posts: 222
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Function IsWindows11

Postby Antonio Linares » Fri Oct 14, 2022 7:21 pm

Dear Giovany,

FWH already supports Windows 11 from function cWinVersion():
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   MsgInfo( cWinVersion() )

return nil

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42071
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests