diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-01-18 06:58:59 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-01-18 06:58:59 +0300 |
commit | 4441ba70441a62afce2e67ab21abeb489514a213 (patch) | |
tree | 7d642464b7611215e0d43e6a3c6e04f13e7cb459 | |
parent | 785a34fc3c1523baf2717e2e8ce5c059395ba07a (diff) |
Undo RuntimeImport optimization for Get/SetLastError
It leads to calling convention mismatch on x86
[tfs-changeset: 1644819]
-rw-r--r-- | src/Common/src/Interop/Windows/mincore/Interop.GetLastError.cs | 5 | ||||
-rw-r--r-- | src/Common/src/Interop/Windows/mincore/Interop.SetLastError.cs | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/Common/src/Interop/Windows/mincore/Interop.GetLastError.cs b/src/Common/src/Interop/Windows/mincore/Interop.GetLastError.cs index fce9ba542..45dcf94c1 100644 --- a/src/Common/src/Interop/Windows/mincore/Interop.GetLastError.cs +++ b/src/Common/src/Interop/Windows/mincore/Interop.GetLastError.cs @@ -2,16 +2,13 @@ // 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.Runtime; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; internal partial class Interop { internal partial class mincore { - [MethodImpl(MethodImplOptions.InternalCall)] - [RuntimeImport(Interop.Libraries.ErrorHandling, "GetLastError")] + [DllImport("api-ms-win-core-errorhandling-l1-1-0.dll")] internal extern static int GetLastError(); } } diff --git a/src/Common/src/Interop/Windows/mincore/Interop.SetLastError.cs b/src/Common/src/Interop/Windows/mincore/Interop.SetLastError.cs index 16e8ec8e0..583043061 100644 --- a/src/Common/src/Interop/Windows/mincore/Interop.SetLastError.cs +++ b/src/Common/src/Interop/Windows/mincore/Interop.SetLastError.cs @@ -2,16 +2,13 @@ // 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.Runtime; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; internal partial class Interop { internal partial class mincore { - [MethodImpl(MethodImplOptions.InternalCall)] - [RuntimeImport(Interop.Libraries.ErrorHandling, "SetLastError")] + [DllImport("api-ms-win-core-errorhandling-l1-1-0.dll")] internal extern static void SetLastError(uint dwErrCode); } } |