From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id D68E63858CDA; Wed, 20 Mar 2024 19:06:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D68E63858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1710961602; bh=fzuzAcMFnYg2z2IAt/V+rfhW1bGtCu/paVdywc8eO30=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=qZ8RkEkHA0B48nggeagI173XJhyzSIZSFHTl/s6EP5GJPtACD/ZJ5Qy2C0rbQR4HI 94Ul3bRdkRgRunPwIY8xY7M6IddRcZryRmASDrfTudZtu8Sln+3KeycBNGrCglm9Ax 77HJptBfIOH5BL6Er2+hzc5VVfb5sRIVFoRTNoEM= Received: by calimero.vinschen.de (Postfix, from userid 500) id B7B34A806F6; Wed, 20 Mar 2024 20:06:40 +0100 (CET) Date: Wed, 20 Mar 2024 20:06:40 +0100 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: GetVersionEx() depreciated, what should be used instead for Windows 7/8/10? Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <0d8daf74-2861-8b08-b47c-28cf5d3b991f@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0d8daf74-2861-8b08-b47c-28cf5d3b991f@t-online.de> List-Id: 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