blob: cad457d9154a0730621f544b90fd221154850035 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class Normaliz
{
//
// Idn APIs
//
[DllImport("Normaliz.dll", CharSet = CharSet.Unicode, SetLastError = true)]
internal static extern int IdnToAscii(
uint dwFlags,
IntPtr lpUnicodeCharStr,
int cchUnicodeChar,
[System.Runtime.InteropServices.OutAttribute()]
IntPtr lpASCIICharStr,
int cchASCIIChar);
[DllImport("Normaliz.dll", CharSet = CharSet.Unicode, SetLastError = true)]
internal static extern int IdnToUnicode(
uint dwFlags,
IntPtr lpASCIICharStr,
int cchASCIIChar,
[System.Runtime.InteropServices.OutAttribute()]
IntPtr lpUnicodeCharStr,
int cchUnicodeChar);
internal const int IDN_ALLOW_UNASSIGNED = 0x1;
internal const int IDN_USE_STD3_ASCII_RULES = 0x2;
internal const int ERROR_INVALID_NAME = 123;
}
}
|