Skip to content

Commit

Permalink
Fix DllImport of IdnToAscii & IdnToUnicode (dotnet/coreclr#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.

Commit migrated from dotnet/coreclr@dec5a1f
  • Loading branch information
John Chen authored and tarekgh committed Dec 19, 2016
1 parent 58feea1 commit 94efcbc
Showing 1 changed file with 2 additions and 2 deletions.
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 94efcbc

Please sign in to comment.