Commit cf6d671a authored by Maurice Kalinowski's avatar Maurice Kalinowski
Browse files

winrt: Use Windows 10 features when available


OpenFileMappingFromApp has been added for Windows 10. Using it,
QSharedMemory autotests succeed without any failure.

Change-Id: I5a4fbec004f121f41909ae13f3db02c384810645
Reviewed-by: default avatarAndrew Knight <andrew.knight@intopalo.com>
Showing with 4 additions and 0 deletions
...@@ -101,7 +101,11 @@ HANDLE QSharedMemoryPrivate::handle() ...@@ -101,7 +101,11 @@ HANDLE QSharedMemoryPrivate::handle()
Q_UNIMPLEMENTED(); Q_UNIMPLEMENTED();
hand = 0; hand = 0;
#elif defined(Q_OS_WINRT) #elif defined(Q_OS_WINRT)
#if _MSC_VER >= 1900
hand = OpenFileMappingFromApp(FILE_MAP_ALL_ACCESS, FALSE, reinterpret_cast<PCWSTR>(nativeKey.utf16()));
#else
hand = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, (PCWSTR)nativeKey.utf16()); hand = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, (PCWSTR)nativeKey.utf16());
#endif
#elif defined(Q_OS_WINCE) #elif defined(Q_OS_WINCE)
// This works for opening a mapping too, but always opens it with read/write access in // This works for opening a mapping too, but always opens it with read/write access in
// attach as it seems. // attach as it seems.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment