Fix Running .NET Core Under Windows App Compat Shim (dotnet/coreclr#26605)
commitf97ceb5c3e9180e1be0d83eb8a5c98c5c945ea33
authorTarek Mahmoud Sayed <tarekms@microsoft.com>
Tue, 10 Sep 2019 18:42:25 +0000 (10 11:42 -0700)
committerMarek Safar <marek.safar@gmail.com>
Wed, 11 Sep 2019 07:05:40 +0000 (11 09:05 +0200)
treedb42fc3f348752828fd67256728d2f9bb4b8f2d1
parent2e78f0c739840768d192fbc27c1cfec9dacd30e8
Fix Running .NET Core Under Windows App Compat Shim (dotnet/coreclr#26605)

* Fix Running .NET Core Under Winndows App Compat Shim

.NET Core uses Windows features called sort handles for perf reason to speed up the collation operations (e.g. string comparisons). When enabling Windows app compat shim (e.g. Windows 7 compatibility mode), the calls uses sort handles will fail which cause all collation operations to fail.
The fix here is to detect if the sort handles work before using it to ensure successful run.

* Address the feedback

* More feedback addressing

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
netcore/System.Private.CoreLib/shared/Interop/Windows/Kernel32/Interop.Globalization.cs
netcore/System.Private.CoreLib/shared/System/Globalization/CompareInfo.Windows.cs
netcore/System.Private.CoreLib/shared/System/Globalization/TextInfo.Windows.cs