Scope CreateFileMapping2 to valid API partitions (#12374)

This commit is contained in:
Justin Stoecker 2022-07-28 16:47:36 -07:00 committed by GitHub
parent 0e85af6990
commit 9c0fa65110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -369,7 +369,7 @@ class WindowsEnv : public Env {
" - ", std::system_category().message(error_code));
}
#if NTDDI_VERSION >= NTDDI_WIN10_RS5
#if NTDDI_VERSION >= NTDDI_WIN10_RS5 && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
wil::unique_hfile file_mapping_handle{
CreateFileMapping2(file_handle.get(),
nullptr,