Merge pull request #824 from evpobr/fix-createfile2

Fix WinRT configuring
This commit is contained in:
Tsuda Kageyu
2017-06-09 08:53:25 +09:00
committed by GitHub
3 changed files with 10 additions and 1 deletions

View File

@ -51,7 +51,7 @@ namespace
{
const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE);
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)
#if defined (PLATFORM_WINRT)
return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL);
#else
return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);