From e28db872e7fc5ffd9ce637b54b749cac4ae9d7cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Strehovsk=C3=BD?= Date: Tue, 25 Apr 2017 13:13:36 -0700 Subject: [PATCH] Merge pull request dotnet/corert#3429 from dotnet/nmirror Merge nmirror to master Signed-off-by: dotnet-bot --- .../Interop/Windows/Kernel32/Interop.GetCPInfo.cs | 24 ++++++++++++++++++++++ .../shared/System.Private.CoreLib.Shared.projitems | 1 + 2 files changed, 25 insertions(+) create mode 100644 src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetCPInfo.cs diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetCPInfo.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetCPInfo.cs new file mode 100644 index 0000000..1665119 --- /dev/null +++ b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetCPInfo.cs @@ -0,0 +1,24 @@ +// 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.IO; +using System.Text; +using System.Runtime.InteropServices; + +internal partial class Interop +{ + internal partial class Kernel32 + { + internal unsafe struct CPINFO + { + internal int MaxCharSize; + + internal fixed byte DefaultChar[2 /* MAX_DEFAULTCHAR */]; + internal fixed byte LeadByte[12 /* MAX_LEADBYTES */]; + } + + [DllImport(Libraries.Kernel32)] + internal static extern unsafe int GetCPInfo(uint codePage, CPINFO* lpCpInfo); + } +} diff --git a/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems b/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems index a6ef453..3443a2b 100644 --- a/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems +++ b/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems @@ -458,6 +458,7 @@ + -- 2.7.4