diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2019-03-04 04:27:14 +0300 |
---|---|---|
committer | Kornel <kornel@geekhood.net> | 2019-03-04 04:27:14 +0300 |
commit | 4a960640a340a848a2d2c27f19b339c2c3d3f734 (patch) | |
tree | f09fc7b1b03e40c740f78258d72b480b92cd17ce /CPP/Windows | |
parent | 5b2a99c548a6c9c90d4cc63cddca29af009c2479 (diff) |
19.0019.00
Diffstat (limited to 'CPP/Windows')
-rw-r--r-- | CPP/Windows/MemoryLock.cpp | 21 | ||||
-rw-r--r-- | CPP/Windows/Shell.cpp | 20 |
2 files changed, 37 insertions, 4 deletions
diff --git a/CPP/Windows/MemoryLock.cpp b/CPP/Windows/MemoryLock.cpp index 8d2134b1..f9d08a6e 100644 --- a/CPP/Windows/MemoryLock.cpp +++ b/CPP/Windows/MemoryLock.cpp @@ -2,6 +2,8 @@ #include "StdAfx.h" +#include "../../C/CpuArch.h" + #include "MemoryLock.h" namespace NWindows { @@ -75,6 +77,9 @@ typedef void (WINAPI * Func_RtlGetVersion) (OSVERSIONINFOEXW *); We suppose that Window 10 works incorrectly with "Large Pages" at: - Windows 10 1703 (15063) - Windows 10 1709 (16299) + + - Windows 10 1809 (17763) on some CPUs that have no 1 GB page support. + We need more information about that new BUG in Windows. */ unsigned Get_LargePages_RiskLevel() @@ -87,9 +92,19 @@ unsigned Get_LargePages_RiskLevel() if (!func) return 0; func(&vi); - return (vi.dwPlatformId == VER_PLATFORM_WIN32_NT - && vi.dwMajorVersion + vi.dwMinorVersion == 10 - && vi.dwBuildNumber <= 16299) ? 1 : 0; + if (vi.dwPlatformId != VER_PLATFORM_WIN32_NT) + return 0; + if (vi.dwMajorVersion + vi.dwMinorVersion != 10) + return 0; + if (vi.dwBuildNumber <= 16299) + return 1; + + #ifdef MY_CPU_X86_OR_AMD64 + if (!CPU_IsSupported_PageGB()) + return 1; + #endif + + return 0; } #endif diff --git a/CPP/Windows/Shell.cpp b/CPP/Windows/Shell.cpp index 382d774f..b424e67c 100644 --- a/CPP/Windows/Shell.cpp +++ b/CPP/Windows/Shell.cpp @@ -2,6 +2,11 @@ #include "StdAfx.h" +/* +#include <stdio.h> +#include <string.h> +*/ + #include "../Common/MyCom.h" #ifndef _UNICODE #include "../Common/StringConvert.h" @@ -114,9 +119,22 @@ UString CDrop::QueryFileName(UINT fileIndex) void CDrop::QueryFileNames(UStringVector &fileNames) { UINT numFiles = QueryCountOfFiles(); + /* + char s[100]; + sprintf(s, "QueryFileNames: %d files", numFiles); + OutputDebugStringA(s); + */ fileNames.ClearAndReserve(numFiles); for (UINT i = 0; i < numFiles; i++) - fileNames.AddInReserved(QueryFileName(i)); + { + const UString s2 = QueryFileName(i); + if (!s2.IsEmpty()) + fileNames.AddInReserved(s2); + /* + OutputDebugStringW(L"file ---"); + OutputDebugStringW(s2); + */ + } } |