Subject: Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.

From: Magnus Hagander <[email-masked]>
Date: Wed, 27 Apr 2022 05:01:03 -0500

On Tue, Apr 26, 2022, 05:55 Julien Rouhaud <[email-masked]> wrote:

> Hi,
>
> Please keep the list in copy, especially if that's about Windows specific
> as
> I'm definitely not very knowledgeable about it.
>
> On Fri, Apr 01, 2022 at 09:18:03AM +0000, Wilm Hoyer wrote:
> >
> > If you don't wanna go the manifest way, maybe the RtlGetVersion function
> is the one you need:
> >
> https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlgetversion?redirectedfrom=MSDN
>
> Thanks for the info!  I tried to use the function but trying to include
> either
> wdm.h or Ntddk.h errors out.  Unfortunately I don't know how to look for a
> file
> in Windows so I don't even know if those files are present.
>

That's a kernel api for use in drivers. Not in applications. You need the
device driver developer kit to get to the headers.

It's not supposed to be used from a user land application.

But note the documentation comment that says: “*RtlGetVersion* is the
kernel-mode equivalent of the user-mode *GetVersionEx* function in the
Windows SDK. ".

Tldr, user mode applications are supposed to use GetVersionEx().

/Magnus