summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Chen <jochen@microsoft.com>2016-12-19 11:17:25 -0800
committerTarek Mahmoud Sayed <tarekms@microsoft.com>2016-12-19 11:17:25 -0800
commitdec5a1ff4088780bf0b8226002a5a51d7d6c4d3a (patch)
treed72ebc7c09b3ff588172a72978a4575953cccb21
parent8395eb5238c8b4dcb06a1f16901cd8f5d3f07f6c (diff)
downloadcoreclr-dec5a1ff4088780bf0b8226002a5a51d7d6c4d3a.tar.gz
coreclr-dec5a1ff4088780bf0b8226002a5a51d7d6c4d3a.tar.bz2
coreclr-dec5a1ff4088780bf0b8226002a5a51d7d6c4d3a.zip
Fix DllImport of IdnToAscii & IdnToUnicode (#8666)
Fix an issue found in OneCoreUAP testing. According to MSDN, the official exporting DLL for IdnToAccii and IdnToUnicode is normaliz.dll, not kernel32.dll. While most Windows SKUs export these functions from both normaliz.dll and kernel32.dll, recent tests revealed that some Windows SKUs export them from normaliz.dll only.
-rw-r--r--src/mscorlib/src/System/Globalization/IdnMapping.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mscorlib/src/System/Globalization/IdnMapping.cs b/src/mscorlib/src/System/Globalization/IdnMapping.cs
index b161851b4d..bf75f5be3c 100644
--- a/src/mscorlib/src/System/Globalization/IdnMapping.cs
+++ b/src/mscorlib/src/System/Globalization/IdnMapping.cs
@@ -1158,7 +1158,7 @@ namespace System.Globalization
[SuppressUnmanagedCodeSecurityAttribute()]
- [DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
+ [DllImport("normaliz.dll", CharSet=CharSet.Unicode, SetLastError=true)]
private static extern int IdnToAscii(
uint dwFlags,
[InAttribute()]
@@ -1171,7 +1171,7 @@ namespace System.Globalization
int cchASCIIChar);
[SuppressUnmanagedCodeSecurityAttribute()]
- [DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
+ [DllImport("normaliz.dll", CharSet=CharSet.Unicode, SetLastError=true)]
private static extern int IdnToUnicode(
uint dwFlags,
[InAttribute()]