Merge pull request dotnet/corert#3709 from dotnet/nmirror
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Fri, 26 May 2017 01:24:34 +0000 (18:24 -0700)
committerJan Kotas <jkotas@microsoft.com>
Fri, 26 May 2017 06:27:03 +0000 (23:27 -0700)
Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
src/mscorlib/shared/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs [new file with mode: 0644]
src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs [new file with mode: 0644]
src/mscorlib/shared/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs [new file with mode: 0644]
src/mscorlib/shared/System.Private.CoreLib.Shared.projitems

diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs
new file mode 100644 (file)
index 0000000..c372a85
--- /dev/null
@@ -0,0 +1,14 @@
+// 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.Runtime.InteropServices;
+
+internal partial class Interop
+{
+    internal partial class Kernel32
+    {
+        [DllImport(Libraries.Kernel32, EntryPoint = "FreeEnvironmentStringsW", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)]
+        internal static extern unsafe bool FreeEnvironmentStrings(char* lpszEnvironmentBlock);
+    }
+}
diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs
new file mode 100644 (file)
index 0000000..29a6860
--- /dev/null
@@ -0,0 +1,14 @@
+// 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.Runtime.InteropServices;
+
+internal partial class Interop
+{
+    internal partial class Kernel32
+    {
+        [DllImport(Libraries.Kernel32, EntryPoint = "GetEnvironmentStringsW", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)]
+        internal static extern unsafe char* GetEnvironmentStrings();
+    }
+}
diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs
new file mode 100644 (file)
index 0000000..cff406f
--- /dev/null
@@ -0,0 +1,14 @@
+// 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.Runtime.InteropServices;
+
+internal partial class Interop
+{
+    internal partial class Kernel32
+    {
+        [DllImport(Libraries.Kernel32, EntryPoint = "SetEnvironmentVariableW", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)]
+        internal static extern bool SetEnvironmentVariable(string lpName, string lpValue);
+    }
+}
index ae98a97..26cb558 100644 (file)
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.FindFirstFileEx.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.FreeEnvironmentStrings.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetCPInfo.cs" /> 
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetEnvironmentStrings.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.GetFileAttributesEx.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.SECURITY_ATTRIBUTES.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.SecurityOptions.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.SetEndOfFile.cs"/>
+    <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.SetEnvironmentVariable.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.SetThreadErrorMode.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.SetFilePointerEx.cs"/>
     <Compile Include="$(MSBuildThisFileDirectory)Interop\Windows\Kernel32\Interop.WideCharToMultiByte.cs"/>