GetVersionEx() depreciated, what should be used instead for Windows 7/8/10?

Corinna Vinschen corinna-cygwin@cygwin.com
Sun Mar 24 21:05:43 GMT 2024


On Mar 24 15:42, Christian Franke via Cygwin wrote:
> Corinna Vinschen via Cygwin wrote:
> > On Mar 23 10:57, Christian Franke via Cygwin wrote:
> > > On Mar 21 16:15, Corinna Vinschen via Cygwin wrote:
> > > > On Mar 21 09:58, Christian Franke via Cygwin wrote:
> > > > > > > ..
> > > > I just gave it a try on W11. The results are even more funny than I
> > > > anticipated:
> > > > 
> > > > ...
> > > > 
> > > > So, yeah, with your observations especially on older W10 versions and
> > > > with 8.1 doing the same thing, I guess we can safely drop the extra call
> > > > to RtlGetNtVersionNumbers now.
> > > Or:
> > > Keep RtlGetVersionNumbers, compare result with RtlGetVersion and emit debug
> > > output if both differ. This would allow to diagnose a possible future
> > > reappearance of the issue.
> > Good idea! Do you want to create a patch?
> > 
> 
> I tried, but without success. Unfortunately debug_printf() does not work
> because wincap.init() is called before get_cygwin_startup_info() which calls
> strace.activate().

small_printf should work, just needs "\r\n" in the Windows console.

But, anyway, nothing speaks aginst just sticking to the current code.
It works and probably continues to work...


Thanks,
Corinna


More information about the Cygwin mailing list