diff options
author | Atsushi Kanamori <AtsushiKan@users.noreply.github.com> | 2017-04-25 21:53:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 21:53:27 +0300 |
commit | 910af877c821a023e2dc9b8120c6968e25b51a5e (patch) | |
tree | 7f8f28ed716032ee1e17900efe58183e2d3a3238 /src/System.IO.Ports | |
parent | e3931d2656a62ee65535a98046f132b6a14f60be (diff) |
Unblock S.IO.Ports and S.IO.Pipes on Aot. (#18928)
More stray P/Invokes...
Diffstat (limited to 'src/System.IO.Ports')
-rw-r--r-- | src/System.IO.Ports/tests/SerialPort/DosDevices.cs | 2 | ||||
-rw-r--r-- | src/System.IO.Ports/tests/Support/PortHelper.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/System.IO.Ports/tests/SerialPort/DosDevices.cs b/src/System.IO.Ports/tests/SerialPort/DosDevices.cs index c0e74f00cc..ed4e45a733 100644 --- a/src/System.IO.Ports/tests/SerialPort/DosDevices.cs +++ b/src/System.IO.Ports/tests/SerialPort/DosDevices.cs @@ -139,7 +139,7 @@ namespace System.IO.Ports.Tests public const int ERROR_INSUFFICIENT_BUFFER = 122; public const int ERROR_MORE_DATA = 234; - [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)] + [DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "QueryDosDeviceW", CharSet = CharSet.Unicode)] private static extern int QueryDosDevice(string lpDeviceName, char[] lpTargetPath, int ucchMax); } } diff --git a/src/System.IO.Ports/tests/Support/PortHelper.cs b/src/System.IO.Ports/tests/Support/PortHelper.cs index 37ff2601ae..f9ea0f16d2 100644 --- a/src/System.IO.Ports/tests/Support/PortHelper.cs +++ b/src/System.IO.Ports/tests/Support/PortHelper.cs @@ -14,7 +14,7 @@ namespace Legacy.Support [DllImport("kernel32.dll", SetLastError = true)] private static extern int GetLastError(); - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", EntryPoint = "QueryDosDeviceW", CharSet = CharSet.Unicode)] private static extern int QueryDosDevice(string lpDeviceName, IntPtr lpTargetPath, int ucchMax); public static string[] GetPorts() |