summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-08-03 21:20:50 -0700
committerJan Kotas <jkotas@microsoft.com>2017-08-04 12:36:52 +0100
commit73c0d18a0c12b0aad121e31975c429f13d0ac194 (patch)
treea7ee1d417865b0e91aab1655b8a612deef2a615a /src
parentc9f1666bc6ed5f1adcc8a10e7345b37a45550321 (diff)
downloadcoreclr-73c0d18a0c12b0aad121e31975c429f13d0ac194.tar.gz
coreclr-73c0d18a0c12b0aad121e31975c429f13d0ac194.tar.bz2
coreclr-73c0d18a0c12b0aad121e31975c429f13d0ac194.zip
Merge pull request dotnet/corert#4271 from dotnet/nmirror
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src')
-rw-r--r--src/mscorlib/shared/Interop/Windows/Kernel32/Interop.CreateFile2.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.CreateFile2.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.CreateFile2.cs
index 0909d3a6c8..4a1676e03f 100644
--- a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.CreateFile2.cs
+++ b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.CreateFile2.cs
@@ -4,6 +4,7 @@
using Microsoft.Win32.SafeHandles;
using System;
+using System.IO;
using System.Runtime.InteropServices;
internal partial class Interop
@@ -11,13 +12,24 @@ internal partial class Interop
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, EntryPoint = "CreateFile2", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)]
- internal static extern unsafe SafeFileHandle CreateFile2(
+ private static extern unsafe SafeFileHandle CreateFile2Private(
string lpFileName,
int dwDesiredAccess,
System.IO.FileShare dwShareMode,
System.IO.FileMode dwCreationDisposition,
CREATEFILE2_EXTENDED_PARAMETERS* pCreateExParams);
+ internal static unsafe SafeFileHandle CreateFile2(
+ string lpFileName,
+ int dwDesiredAccess,
+ System.IO.FileShare dwShareMode,
+ System.IO.FileMode dwCreationDisposition,
+ CREATEFILE2_EXTENDED_PARAMETERS* pCreateExParams)
+ {
+ lpFileName = PathInternal.EnsureExtendedPrefixOverMaxPath(lpFileName);
+ return CreateFile2Private(lpFileName, dwDesiredAccess, dwShareMode, dwCreationDisposition, pCreateExParams);
+ }
+
internal unsafe struct CREATEFILE2_EXTENDED_PARAMETERS
{
internal uint dwSize;