From 9fb3fac5a0c7bb95d5c08ba11ff8cc7fcb671c2a Mon Sep 17 00:00:00 2001 From: Sheil Kumar Date: Wed, 17 Nov 2021 19:09:31 -0800 Subject: [PATCH] Enable LearningModel::LoadFromFilePath in UWP Apps (#9790) Co-authored-by: Sheil Kumar --- winml/lib/Api/LearningModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winml/lib/Api/LearningModel.cpp b/winml/lib/Api/LearningModel.cpp index 46f8697461..d638fb1702 100644 --- a/winml/lib/Api/LearningModel.cpp +++ b/winml/lib/Api/LearningModel.cpp @@ -26,13 +26,13 @@ LearningModel::LearningModel( #if WINVER >= _WIN32_WINNT_WIN8 CreateFile2(path.c_str(), GENERIC_READ, - 0, + FILE_SHARE_READ, OPEN_EXISTING, NULL)}; #else CreateFileW(path.c_str(), GENERIC_READ, - 0, + FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY,