Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Fix DllImport of IdnToAscii & IdnToUnicode (#8666)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
John Chen authored and tarekgh committed Dec 19, 2016
1 parent 8395eb5 commit dec5a1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mscorlib/src/System/Globalization/IdnMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


[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()]
Expand All @@ -1171,7 +1171,7 @@ private static extern int IdnToAscii(
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()]
Expand Down

0 comments on commit dec5a1f

Please sign in to comment.