Merge pull request dotnet/corertdotnet/coreclr#3429 from dotnet/nmirror
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Tue, 25 Apr 2017 20:13:36 +0000 (13:13 -0700)
committerJan Kotas <jkotas@microsoft.com>
Wed, 26 Apr 2017 12:16:17 +0000 (05:16 -0700)
Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/e28db872e7fc5ffd9ce637b54b749cac4ae9d7cc

src/coreclr/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetCPInfo.cs [new file with mode: 0644]
src/coreclr/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems

diff --git a/src/coreclr/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetCPInfo.cs b/src/coreclr/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetCPInfo.cs
new file mode 100644 (file)
index 0000000..1665119
--- /dev/null
@@ -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);
+    }
+}
index a6ef453..3443a2b 100644 (file)
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.FileTypes.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.FlushFileBuffers.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.FormatMessage.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetCPInfo.cs" />    
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetFileInformationByHandleEx.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetFileType_SafeHandle.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetFullPathNameW.cs"/>