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,