Path: csiph.com!news.mixmin.net!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Karl-Heinz" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: CAVO28 tip about manifest file in Win 10 Redstone Date: Tue, 31 May 2016 16:19:42 +0200 Lines: 61 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: individual.net sOG4kD5d/m5qYlIa8SfcwwOYu9dqBjoJSvlecxC6ZOYuEB17g= Cancel-Lock: sha1:pS1zBveVilfhRjNRYesoDeBrHOY= In-Reply-To: X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 Xref: csiph.com comp.lang.clipper.visual-objects:9389 Hi Jean, beside your manifest advice .. 1. There´s a Set of Helperfunction to detect the OS-Version. https://msdn.microsoft.com/en-us/library/windows/desktop/dn424972%28v=vs.85%29.aspx. Though there´s a macro to detect Win10 via "IsWindows10OrGreater" the docs say: "Indicates if the current OS version matches, or is greater than, the Windows 10 version.For Windows 10, IsWindows10OrGreater returns false unless the application contains a manifest that includes a compatibility section that contains the GUID that designates Windows 10." funny .... 2. Use the RtlGetVersion() Kernel function: No matter if a app is manifested or not. RtlGetVersion() returns the current OS: FUNCTION GetOsVersion( dwMajor REF DWORD , dwMinor REF DWORD , dwBuild REF DWORD ) AS LOGIC PASCAL LOCAL s IS _winOSVERSIONINFOEX LOCAL hFunc AS PTR LOCAL lOk AS LOGIC // _DLL FUNCTION RtlGetVersion ( s AS _WINOSVERSIONINFOEX ) AS DWORD PASCAL:Ntdll.RtlGetVersion s.dwOSVersionInfoSize:= _SIZEOF ( _WINOSVERSIONINFOEX ) IF ( hFunc := GetProcAddress( GetModuleHandle( String2Psz ("Ntdll") ) , String2Psz ( "RtlGetVersion" ))) != NULL_PTR IF ( DWORD ( _CAST , PCALL ( hFunc , @s ) ) ) == 0 dwMajor := s.dwMajorVersion dwMinor := s.dwMinorVersion dwBuild := s.dwBuildNumber lOk := TRUE ENDIF ENDIF RETURN lOk regards Karl-Heinz