diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2017-08-03 21:20:50 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-08-04 12:36:52 +0100 |
commit | 73c0d18a0c12b0aad121e31975c429f13d0ac194 (patch) | |
tree | a7ee1d417865b0e91aab1655b8a612deef2a615a /src | |
parent | c9f1666bc6ed5f1adcc8a10e7345b37a45550321 (diff) | |
download | coreclr-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.cs | 14 |
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; |