delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/03/20/15:07:03

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA01B3858C98
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1710961621;
bh=Aa94w0X6buTdYjfLnmFlcgPyi1PbpTTRZkmDR8V3QoE=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=koSBLh6RmP7GfoeQ9QJVdDSD5ZQ6RRgmcY8BVdkHWQFf5DwWh9sUbrfDo04MqcoWN
QYFQR30VeZ1hvbvEpigqh8fbS0c6MO/kEjsA9pRE2vwxPvGIz4Lf2WbfkWJw6xOkDp
5j36gVfXV7+slPrxVPgFaTxct/a93VmjI9GsaxtU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D68E63858CDA
Date: Wed, 20 Mar 2024 20:06:40 +0100
To: cygwin AT cygwin DOT com
Subject: Re: GetVersionEx() depreciated, what should be used instead for
Windows 7/8/10?
Message-ID: <ZfszwBeYDxxApO9v@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CALXu0UdrjFfhrBmBPNYepvMJ3hL7CPf1n6HEowxZgOxwdoy1TA AT mail DOT gmail DOT com>
<b47b7092-716a-c626-a14d-e5847bc86926 AT t-online DOT de>
<CANV9t=S2BJ2d-_zNm3ZgVeerQ+ZEONQ4fjN1MXc6JVp+Gvrxsg AT mail DOT gmail DOT com>
<CALwydEs5ZTYqSxfZOp_hWobWQxFEeLGio8WoUCwTAM2eaph_sA AT mail DOT gmail DOT com>
<CANV9t=QHLHyv_jvvrCREpyrEX=JqmTdQvnmfUXbSKuvMrhHn9A AT mail DOT gmail DOT com>
<Zfm7ZqZBdMBaoEOM AT calimero DOT vinschen DOT de>
<0d8daf74-2861-8b08-b47c-28cf5d3b991f AT t-online DOT de>
MIME-Version: 1.0
In-Reply-To: <0d8daf74-2861-8b08-b47c-28cf5d3b991f@t-online.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Mar 20 12:39, Christian Franke via Cygwin wrote:
> Corinna Vinschen via Cygwin wrote:
> > You have to create an application with an application manifest not
> > supporting your OS.
> > 
> > For Cygwin apps, this occured when you built, say, an executable under
> > Windows 8.1 before Windows 10 support was added to the Cygwin toolchain:
> > the manifest linked to the Cygwin executable didn't yet contain a GUID
> > entry for Windows 10 support.
> > 
> > In this case, RtlGetVersion returns an OS version 6.3 even when running
> > under the 10.0 kernel.  This behaviour exists back 'til Windows Vista.
> 
> Could not reproduce the latter on Win10. I tested with recent Win10 and
> Win11 and also found a Win10 1511 (and Slackware 1.1.2, Win3.1, OS/2, ...)
> in my VM image museum.
> 
> Regardless of the exe manifest, RtlGetVersion and RtlGetNtVersionNumbers
> return the correct versions:
> 10.0.22621 (Win11 22H2)
> 10.0.19045 (Win10 22H2)
> 10.0.10586 (Win10 1511)
> 
> Without a manifest, GetVersionEx returns:
> 6.2.9200 (Win8)

Please check on commit 48511f3d3847c.  It was a real, existing problem
at the time.  I wouldn't have added the RtlGetNtVersionNumbers call
just for fun.


Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019