1. Miguel Leeuwe
  2. PowerBuilder
  3. Friday, 24 November 2023 17:11 PM UTC

Hi,

Since there's different background colours applied to a ddlb in win11 compared to win10 (when not editable), I need to figure out if I'm running win10 or previous or Win11 or later.

I thought of using "Function Boolean RtlGetNtVersionNumbers (Ref Long Major, Ref Long Minor,  Ref Long Optional ) Library  "ntdll.dll" ", but for win11 I'm getting the same major = 10 and minor = 0 revisions as for win10.

Has anyone figured this out already?

TIA

Accepted Answer
Arnd Schmidt Accepted Answer Pending Moderation
  1. Friday, 24 November 2023 17:20 PM UTC
  2. PowerBuilder
  3. # Permalink

Check out Roland's n_osversion.sru 

hth

Arnd

Comment
  1. Arnd Schmidt
  2. Friday, 24 November 2023 18:59 PM UTC
Personally I think that this was someone (one Person!) with a broken system / registry stuff ;-)

That solution based on a registry key!

It seems to me that this is also the reason why other implementations read the version information from "kernel32.dll" - That is how n_osversion is coded.

Happy Colouring ;-)
  1. Helpful
  1. Roland Smith
  2. Saturday, 25 November 2023 02:40 AM UTC
Internally Windows 11 is version 10. I have Windows 11 22H2 and the internal version of kernel32.dll is 10.0.22621.2506.

  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 25 November 2023 09:12 AM UTC
Thanks Arnd and Roland!
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.