Skip to content

Commit

Permalink
Scope CreateFileMapping2 to valid API partitions (#12374)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstoecker authored Jul 28, 2022
1 parent 0e85af6 commit 9c0fa65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxruntime/core/platform/windows/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9c0fa65

Please sign in to comment.