X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F9BF3858433
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1710860515;
	bh=H5In9P0KXnV1q0lqEAYmIyTmsLD27rTzy5sPcPFlm48=;
	h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=NYfDSeL5PEcd1Pv3Y9Q61n09MU4utGyCBLTdW1KT6q/5L5hZuri6AsQBhYKRd1SsL
	 V8YxeQDte1C4htZry8xTyj8ZBfXAnK59w3CmsRbeNM/I9lIbRIHwZ8J7q3HOnwSigj
	 re/KHwxftmfnYske9sbtam3g+aQOeKNmVNrS1n04=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B08AC3858D37
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B08AC3858D37
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710860460; cv=none;
 b=u/qrUnH2OiQO/1zmsM5W6H7RwafHVE3auqbgaBk0SmxGc7tpel90v9cnCUXjfoSSVkPeksGvkypqayOzP6N02fvPHA2yQ1hg6ZowfWCNxfV6XYfK0pWBR70Tgh6cU+vhekv9WZv/6GVTAsH4wcEmnABNZBBFSBE3Lt+yRm+fKL4=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1710860460; c=relaxed/simple;
 bh=ZotOTkTjmysT5yVhm3y9G82KMfxsozRIWgs5Ih95bgg=;
 h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
 b=o8PxEd4dCjMxqgWhDlPIoCWPgYY8n8p7V3WZnwq71JuIyoPFjlqoewfXcfszv05lB2a+NRg9zn8h7HGrDECvF6Do7/0ROsnDrTNZCnIKCaq5P8/jmd09PudyYYM/oxS8aXsDbm9jXfR2SSvNhgx6KULXj1aUDvrjE0TFaaYd+mM=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1710860457; x=1711465257;
 h=to:subject:message-id:date:from:in-reply-to:references:mime-version
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=dz4j+C76nE31/29TwG3aJOYOe4s0J3Hsr2/Wre9K9VU=;
 b=wiNrSmS+ALJIudC6lm7dSmJ9uRTCFwPZi7xS5qumm8SlXgzSoZQHOLtgN5DxhfpjLS
 v2wqEoA3NzksNhs3/ODdhbi7aubCTL8nW4lf2AEKE0hPtcjm8ua8bFvyLqT8PaFVTvK0
 XoAL+PTByW8jlmw730xkwqaPr5wzO1SpmxhxryB11GmtS4n6Rm4W2B7bB/6cX2mGdHCO
 E1iaUHkBCmcgxEZwta2g4uxFjPxq8NbeurbiNAhHhP2QXnW7d2Q9AvAofmsi+uDV9kGu
 dDGlg3M8A9iwGaxmkOy3B37aO8IGTGWiE9Fn/VQXuId+d8e4wiKUtFVigb3UqETmlxVU
 a6wQ==
X-Gm-Message-State: AOJu0YwSWAL1kon9nE4jv6qc3MiP6KTUufp9Q1nHxLuSAmRuVAb6xvsl
 l/+PSCYOeFBrep2JE58v2ySJuoVVCQK0Y9JLeIu/36llMQbvwjak5ZXE8LBRVP5VtwcP4mDzNPd
 3CtxlooCrq4gjp78yg8lCkPM1JRzaA15o6d0=
X-Google-Smtp-Source: AGHT+IFX/lj6/KDz12w5oj1OMAn1RfuaTOwVfGSz0GV8zHrzClg4Fw1ik0dtSlPuMk3/HVbXbOORSwVEiDzMG7nBWdM=
X-Received: by 2002:aa7:d591:0:b0:56b:8439:6d91 with SMTP id
 r17-20020aa7d591000000b0056b84396d91mr2090145edq.40.1710860456519; Tue, 19
 Mar 2024 08:00:56 -0700 (PDT)
MIME-Version: 1.0
References: <CALXu0UdrjFfhrBmBPNYepvMJ3hL7CPf1n6HEowxZgOxwdoy1TA@mail.gmail.com>
 <b47b7092-716a-c626-a14d-e5847bc86926@t-online.de>
 <CANV9t=S2BJ2d-_zNm3ZgVeerQ+ZEONQ4fjN1MXc6JVp+Gvrxsg@mail.gmail.com>
In-Reply-To: <CANV9t=S2BJ2d-_zNm3ZgVeerQ+ZEONQ4fjN1MXc6JVp+Gvrxsg@mail.gmail.com>
Date: Tue, 19 Mar 2024 10:00:44 -0500
Message-ID: <CALwydEs5ZTYqSxfZOp_hWobWQxFEeLGio8WoUCwTAM2eaph_sA@mail.gmail.com>
Subject: Re: GetVersionEx() depreciated, what should be used instead for
 Windows 7/8/10?
To: cygwin@cygwin.com
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
 RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP,
 T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.30
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Richard Campbell via Cygwin <cygwin@cygwin.com>
Reply-To: Richard Campbell <richard.u.campbell@gmail.com>
Content-Type: text/plain; charset="utf-8"
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 42JF1v1d778808

On Tue, Mar 19, 2024 at 9:04 AM Bill Stewart via Cygwin <cygwin@cygwin.com>
wrote:

>
> Can you please clarify the circumstances under which the RtlGetVersion
> function "may not return the correct values"?
>

"Originally, using RtlGetVersion instead of GetVersionEx was supposed to
fix the fact that GetVersionInfo returns the wrong kernel version if the
executable has been built with an old manifest (or none at all), starting
with Windows 8.1.  Either this never really worked as desired and our
testing was flawed, or this has been changed again with Windows 10, so
that RtlGetVersion does the kernel faking twist as well.  Since we're
only reading the value in the first process in a process tree. the entire
process tree is running with a wrong OS version information in that case.

Fortunately, the (undocumented) RtlGetNtVersionNumbers function is not
affected by this nonsense, so we simply override the OS version info
fields with the correct values now."
https://cygwin.com/git/?p=newlib-cygwin.git;a=commitdiff;h=48511f3d3847c35352d09cded56e25f0c1b22bc9


-Richard Campbell.

-- 
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

