summaryrefslogtreecommitdiff
path: root/src/mscorlib/corefx/Interop/Windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/corefx/Interop/Windows')
-rw-r--r--src/mscorlib/corefx/Interop/Windows/Interop.Errors.cs71
-rw-r--r--src/mscorlib/corefx/Interop/Windows/Interop.Libraries.cs67
-rw-r--r--src/mscorlib/corefx/Interop/Windows/NtDll/Interop.ZeroMemory.cs2
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CancelIoEx.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.CancelIoEx.cs)6
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CloseHandle.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.CloseHandle.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CreateFile.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.CreateFile.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FileOperations.cs12
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FileTypes.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.FileTypes.cs)2
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FlushFileBuffers.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.FlushFileBuffers.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FormatMessage.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.FormatMessage.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFileInformationByHandleEx.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFileInformationByHandleEx.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFileType_SafeHandle.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFileType_SafeHandle.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFullPathNameW.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFullPathNameW.cs)6
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetLongPathNameW.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetLongPathNameW.cs)6
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetTempFileNameW.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetTempFileNameW.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetTempPathW.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetTempPathW.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.LockFile.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.LockFile.cs)6
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.ReadFile_SafeHandle_IntPtr.cs)6
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.ReadFile_SafeHandle_NativeOverlapped.cs)6
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SECURITY_ATTRIBUTES.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.SECURITY_ATTRIBUTES.cs)2
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SafeCreateFile.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.SafeCreateFile.cs)8
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SecurityOptions.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.SecurityOptions.cs)2
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetEndOfFile.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetEndOfFile.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetErrorMode.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetErrorMode.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetFileInformationByHandle.cs39
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetFilePointerEx.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetFilePointerEx.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.UnsafeCreateFile.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.UnsafeCreateFile.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WideCharToMultiByte.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.WideCharToMultiByte.cs)4
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.WriteFile_SafeHandle_IntPtr.cs)6
-rw-r--r--src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs (renamed from src/mscorlib/corefx/Interop/Windows/mincore/Interop.WriteFile_SafeHandle_NativeOverlapped.cs)6
-rw-r--r--src/mscorlib/corefx/Interop/Windows/mincore/Interop.Errors.cs74
-rw-r--r--src/mscorlib/corefx/Interop/Windows/mincore/Interop.FileOperations.cs35
-rw-r--r--src/mscorlib/corefx/Interop/Windows/mincore/Interop.Idna.cs37
-rw-r--r--src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetFileInformationByHandle.cs72
-rw-r--r--src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs27
35 files changed, 179 insertions, 371 deletions
diff --git a/src/mscorlib/corefx/Interop/Windows/Interop.Errors.cs b/src/mscorlib/corefx/Interop/Windows/Interop.Errors.cs
new file mode 100644
index 0000000..7eeb18d
--- /dev/null
+++ b/src/mscorlib/corefx/Interop/Windows/Interop.Errors.cs
@@ -0,0 +1,71 @@
+// 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.
+
+internal partial class Interop
+{
+ internal partial class Errors
+ {
+ internal const int ERROR_SUCCESS = 0x0;
+ internal const int ERROR_INVALID_FUNCTION = 0x1;
+ internal const int ERROR_FILE_NOT_FOUND = 0x2;
+ internal const int ERROR_PATH_NOT_FOUND = 0x3;
+ internal const int ERROR_ACCESS_DENIED = 0x5;
+ internal const int ERROR_INVALID_HANDLE = 0x6;
+ internal const int ERROR_NOT_ENOUGH_MEMORY = 0x8;
+ internal const int ERROR_INVALID_DATA = 0xD;
+ internal const int ERROR_INVALID_DRIVE = 0xF;
+ internal const int ERROR_NO_MORE_FILES = 0x12;
+ internal const int ERROR_NOT_READY = 0x15;
+ internal const int ERROR_BAD_LENGTH = 0x18;
+ internal const int ERROR_SHARING_VIOLATION = 0x20;
+ internal const int ERROR_LOCK_VIOLATION = 0x21;
+ internal const int ERROR_HANDLE_EOF = 0x26;
+ internal const int ERROR_FILE_EXISTS = 0x50;
+ internal const int ERROR_INVALID_PARAMETER = 0x57;
+ internal const int ERROR_BROKEN_PIPE = 0x6D;
+ internal const int ERROR_INSUFFICIENT_BUFFER = 0x7A;
+ internal const int ERROR_INVALID_NAME = 0x7B;
+ internal const int ERROR_NEGATIVE_SEEK = 0x83;
+ internal const int ERROR_DIR_NOT_EMPTY = 0x91;
+ internal const int ERROR_BAD_PATHNAME = 0xA1;
+ internal const int ERROR_LOCK_FAILED = 0xA7;
+ internal const int ERROR_BUSY = 0xAA;
+ internal const int ERROR_ALREADY_EXISTS = 0xB7;
+ internal const int ERROR_BAD_EXE_FORMAT = 0xC1;
+ internal const int ERROR_ENVVAR_NOT_FOUND = 0xCB;
+ internal const int ERROR_FILENAME_EXCED_RANGE = 0xCE;
+ internal const int ERROR_EXE_MACHINE_TYPE_MISMATCH = 0xD8;
+ internal const int ERROR_PIPE_BUSY = 0xE7;
+ internal const int ERROR_NO_DATA = 0xE8;
+ internal const int ERROR_PIPE_NOT_CONNECTED = 0xE9;
+ internal const int ERROR_MORE_DATA = 0xEA;
+ internal const int ERROR_NO_MORE_ITEMS = 0x103;
+ internal const int ERROR_PARTIAL_COPY = 0x12B;
+ internal const int ERROR_ARITHMETIC_OVERFLOW = 0x216;
+ internal const int ERROR_PIPE_CONNECTED = 0x217;
+ internal const int ERROR_PIPE_LISTENING = 0x218;
+ internal const int ERROR_OPERATION_ABORTED = 0x3E3;
+ internal const int ERROR_IO_PENDING = 0x3E5;
+ internal const int ERROR_NO_TOKEN = 0x3f0;
+ internal const int ERROR_DLL_INIT_FAILED = 0x45A;
+ internal const int ERROR_NOT_FOUND = 0x490;
+ internal const int ERROR_NON_ACCOUNT_SID = 0x4E9;
+ internal const int ERROR_NOT_ALL_ASSIGNED = 0x514;
+ internal const int ERROR_UNKNOWN_REVISION = 0x519;
+ internal const int ERROR_INVALID_OWNER = 0x51B;
+ internal const int ERROR_INVALID_PRIMARY_GROUP = 0x51C;
+ internal const int ERROR_NO_SUCH_PRIVILEGE = 0x521;
+ internal const int ERROR_PRIVILEGE_NOT_HELD = 0x522;
+ internal const int ERROR_INVALID_ACL = 0x538;
+ internal const int ERROR_INVALID_SECURITY_DESCR = 0x53A;
+ internal const int ERROR_INVALID_SID = 0x539;
+ internal const int ERROR_BAD_IMPERSONATION_LEVEL = 0x542;
+ internal const int ERROR_CANT_OPEN_ANONYMOUS = 0x543;
+ internal const int ERROR_NO_SECURITY_ON_OBJECT = 0x546;
+ internal const int ERROR_TRUSTED_RELATIONSHIP_FAILURE = 0x6FD;
+ internal const int ERROR_RESOURCE_LANG_NOT_FOUND = 0x717;
+ internal const int EFail = unchecked((int)0x80004005);
+ internal const int E_FILENOTFOUND = unchecked((int)0x80070002);
+ }
+}
diff --git a/src/mscorlib/corefx/Interop/Windows/Interop.Libraries.cs b/src/mscorlib/corefx/Interop/Windows/Interop.Libraries.cs
index 1165a2d..f19f9dc 100644
--- a/src/mscorlib/corefx/Interop/Windows/Interop.Libraries.cs
+++ b/src/mscorlib/corefx/Interop/Windows/Interop.Libraries.cs
@@ -6,77 +6,10 @@ internal static partial class Interop
{
internal static class Libraries
{
- internal const string Advapi32 = "advapi32.dll";
internal const string BCrypt = "BCrypt.dll";
- internal const string Combase = "combase.dll";
- internal const string Console_L1 = "api-ms-win-core-console-l1-1-0.dll";
- internal const string Console_L2 = "api-ms-win-core-console-l2-1-0.dll";
- internal const string CoreFile_L1 = "api-ms-win-core-file-l1-1-0.dll";
- internal const string CoreFile_L1_2 = "api-ms-win-core-file-l1-2-0.dll";
- internal const string CoreFile_L2 = "api-ms-win-core-file-l2-1-0.dll";
internal const string Crypt32 = "crypt32.dll";
- internal const string Debug = "api-ms-win-core-debug-l1-1-0.dll";
- internal const string Error_L1 = "api-ms-win-core-winrt-error-l1-1-0.dll";
- internal const string ErrorHandling = "api-ms-win-core-errorhandling-l1-1-0.dll";
- internal const string Eventing = "api-ms-win-eventing-provider-l1-1-0.dll";
- internal const string Handle = "api-ms-win-core-handle-l1-1-0.dll";
- internal const string Heap = "api-ms-win-core-heap-obsolete-l1-1-0.dll";
- internal const string Heap_L1 = "api-ms-win-core-heap-l1-1-0.dll";
- internal const string IO = "api-ms-win-core-io-l1-1-0.dll";
- internal const string IpHlpApi = "iphlpapi.dll";
internal const string Kernel32 = "kernel32.dll";
- internal const string Kernel32_L1 = "api-ms-win-core-kernel32-legacy-l1-1-1.dll";
- internal const string Kernel32_L2 = "api-ms-win-core-kernel32-legacy-l1-1-0.dll";
- internal const string Keyboard = "ext-ms-win-ntuser-keyboard-l1-2-1.dll";
- internal const string LibraryLoader = "api-ms-win-core-libraryloader-l1-1-0.dll";
- internal const string Localization = "api-ms-win-core-localization-l1-2-0.dll";
- internal const string Memory_L1_0 = "api-ms-win-core-memory-l1-1-0.dll";
- internal const string Memory_L1_1 = "api-ms-win-core-memory-l1-1-1.dll";
- internal const string Memory_L1_2 = "api-ms-win-core-memory-l1-1-2.dll";
- internal const string Memory_L1_3 = "api-ms-win-core-memory-l1-1-3.dll";
- internal const string NCrypt = "ncrypt.dll";
internal const string NtDll = "ntdll.dll";
internal const string OleAut32 = "oleaut32.dll";
- internal const string Pipe = "api-ms-win-core-namedpipe-l1-1-0.dll";
- internal const string Pipe_L2 = "api-ms-win-core-namedpipe-l1-2-1.dll";
- internal const string ProcessEnvironment = "api-ms-win-core-processenvironment-l1-1-0.dll";
- internal const string ProcessThread_L1 = "api-ms-win-core-processthreads-l1-1-0.dll";
- internal const string ProcessThread_L1_1 = "api-ms-win-core-processthreads-l1-1-1.dll";
- internal const string ProcessThread_L1_2 = "api-ms-win-core-processthreads-l1-1-2.dll";
- internal const string ProcessTopology = "api-ms-win-core-processtopology-obsolete-l1-1-0.dll";
- internal const string Profile = "api-ms-win-core-profile-l1-1-0.dll";
- internal const string Psapi = "api-ms-win-core-psapi-l1-1-0.dll";
- internal const string Psapi_Obsolete = "api-ms-win-core-psapi-obsolete-l1-1-0.dll";
- internal const string Registry_L1 = "api-ms-win-core-registry-l1-1-0.dll";
- internal const string Registry_L2 = "api-ms-win-core-registry-l2-1-0.dll";
- internal const string RoBuffer = "api-ms-win-core-winrt-robuffer-l1-1-0.dll";
- internal const string SecurityBase = "api-ms-win-security-base-l1-1-0.dll";
- internal const string SecurityCpwl = "api-ms-win-security-cpwl-l1-1-0.dll";
- internal const string SecurityCryptoApi = "api-ms-win-security-cryptoapi-l1-1-0.dll";
- internal const string SecurityLsa = "api-ms-win-security-lsalookup-l2-1-0.dll";
- internal const string SecurityLsaPolicy = "api-ms-win-security-lsapolicy-l1-1-0.dll";
- internal const string SecurityProvider = "api-ms-win-security-provider-l1-1-0.dll";
- internal const string SecuritySddl = "api-ms-win-security-sddl-l1-1-0.dll";
- internal const string ServiceCore = "api-ms-win-service-core-l1-1-1.dll";
- internal const string ServiceMgmt_L1 = "api-ms-win-service-management-l1-1-0.dll";
- internal const string ServiceMgmt_L2 = "api-ms-win-service-management-l2-1-0.dll";
- internal const string ServiceWinSvc = "api-ms-win-service-winsvc-l1-1-0.dll";
- internal const string Shell = "shell32.dll";
- internal const string ShellFolders = "ext-ms-win-shell32-shellfolders-l1-1-0.dll";
- internal const string Sspi = "sspicli.dll";
- internal const string String_L1 = "api-ms-win-core-string-l1-1-0.dll";
- internal const string Synch = "api-ms-win-core-synch-l1-1-0.dll";
- internal const string SystemInfo_L1_1 = "api-ms-win-core-sysinfo-l1-1-0.dll";
- internal const string SystemInfo_L1_2 = "api-ms-win-core-sysinfo-l1-2-0.dll";
- internal const string SystemInfo_L2_1 = "api-ms-win-core-sysinfo-l2-1-0.dll";
- internal const string ThreadPool = "api-ms-win-core-threadpool-l1-2-0.dll";
- internal const string User32 = "user32.dll";
- internal const string Util = "api-ms-win-core-util-l1-1-0.dll";
- internal const string Version = "api-ms-win-core-version-l1-1-0.dll";
- internal const string WinHttp = "winhttp.dll";
- internal const string Winsock = "Ws2_32.dll";
- internal const string Wow64 = "api-ms-win-core-wow64-l1-1-0.dll";
- internal const string Ws2_32 = "ws2_32.dll";
- internal const string Zlib = "clrcompression.dll";
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/NtDll/Interop.ZeroMemory.cs b/src/mscorlib/corefx/Interop/Windows/NtDll/Interop.ZeroMemory.cs
index caa0329..bd2a64c 100644
--- a/src/mscorlib/corefx/Interop/Windows/NtDll/Interop.ZeroMemory.cs
+++ b/src/mscorlib/corefx/Interop/Windows/NtDll/Interop.ZeroMemory.cs
@@ -10,8 +10,6 @@ internal partial class Interop
{
internal partial class NtDll
{
- [DllImport(Libraries.NtDll, CharSet = CharSet.Unicode, EntryPoint = "RtlZeroMemory")]
- internal static extern void ZeroMemory(SafeBSTRHandle address, uint length);
[DllImport(Libraries.NtDll, CharSet = CharSet.Unicode, EntryPoint = "RtlZeroMemory")]
internal static extern void ZeroMemory(IntPtr address, UIntPtr length);
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.CancelIoEx.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CancelIoEx.cs
index 868d409..fc99e30 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.CancelIoEx.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CancelIoEx.cs
@@ -8,9 +8,9 @@ using System.Threading;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.IO, SetLastError = true)]
- internal static unsafe extern bool CancelIoEx(SafeHandle handle, NativeOverlapped* lpOverlapped);
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
+ internal static extern unsafe bool CancelIoEx(SafeHandle handle, NativeOverlapped* lpOverlapped);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.CloseHandle.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CloseHandle.cs
index 029937b..96ed922 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.CloseHandle.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CloseHandle.cs
@@ -7,9 +7,9 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.Handle, SetLastError = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool CloseHandle(IntPtr handle);
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.CreateFile.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CreateFile.cs
index 670037d..5f6f611 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.CreateFile.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.CreateFile.cs
@@ -9,12 +9,12 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
/// <summary>
/// WARNING: This method does not implicitly handle long paths. Use CreateFile.
/// </summary>
- [DllImport(Libraries.CoreFile_L1, EntryPoint = "CreateFileW", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)]
+ [DllImport(Libraries.Kernel32, EntryPoint = "CreateFileW", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)]
private static extern SafeFileHandle CreateFilePrivate(
string lpFileName,
int dwDesiredAccess,
diff --git a/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FileOperations.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FileOperations.cs
new file mode 100644
index 0000000..6e3ebb9
--- /dev/null
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FileOperations.cs
@@ -0,0 +1,12 @@
+// 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.
+
+internal partial class Interop
+{
+ internal partial class Kernel32
+ {
+
+ internal const uint SEM_FAILCRITICALERRORS = 1;
+ }
+}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FileTypes.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FileTypes.cs
index a24813e..1d30666 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FileTypes.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FileTypes.cs
@@ -4,7 +4,7 @@
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
internal partial class FileTypes
{
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FlushFileBuffers.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FlushFileBuffers.cs
index 69f4fe0..e10a227 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FlushFileBuffers.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FlushFileBuffers.cs
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool FlushFileBuffers(SafeHandle hHandle);
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FormatMessage.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FormatMessage.cs
index 02ecbb8..94722b6 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FormatMessage.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.FormatMessage.cs
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
private const int FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200;
private const int FORMAT_MESSAGE_FROM_HMODULE = 0x00000800;
@@ -18,7 +18,7 @@ internal partial class Interop
private const int ERROR_INSUFFICIENT_BUFFER = 0x7A;
- [DllImport(Libraries.Localization, CharSet = CharSet.Unicode, EntryPoint = "FormatMessageW", SetLastError = true, BestFitMapping = true)]
+ [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, EntryPoint = "FormatMessageW", SetLastError = true, BestFitMapping = true)]
private static extern int FormatMessage(
int dwFlags,
IntPtr lpSource,
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFileInformationByHandleEx.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFileInformationByHandleEx.cs
index c4739a5..146c463 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFileInformationByHandleEx.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFileInformationByHandleEx.cs
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L2, SetLastError = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
internal static extern bool GetFileInformationByHandleEx(SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, out FILE_STANDARD_INFO lpFileInformation, uint dwBufferSize);
internal partial struct FILE_STANDARD_INFO
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFileType_SafeHandle.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFileType_SafeHandle.cs
index 3e2567b..c07a168 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFileType_SafeHandle.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFileType_SafeHandle.cs
@@ -7,9 +7,9 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
internal extern static int GetFileType(SafeHandle hFile);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFullPathNameW.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFullPathNameW.cs
index a34cc33..15dd581 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetFullPathNameW.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetFullPathNameW.cs
@@ -7,12 +7,12 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
/// <summary>
/// WARNING: This method does not implicitly handle long paths. Use GetFullPathName or PathHelper.
/// </summary>
- [DllImport(Libraries.CoreFile_L1, SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false, ExactSpelling = true)]
- unsafe internal static extern uint GetFullPathNameW(char* path, uint numBufferChars, SafeHandle buffer, IntPtr mustBeZero);
+ [DllImport(Libraries.Kernel32, SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false, ExactSpelling = true)]
+ unsafe internal static extern uint GetFullPathNameW(char* path, uint numBufferChars, char[] buffer, IntPtr mustBeZero);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetLongPathNameW.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetLongPathNameW.cs
index d50db66..a58d101 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetLongPathNameW.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetLongPathNameW.cs
@@ -7,12 +7,12 @@ using System.Runtime.InteropServices;
partial class Interop
{
- partial class mincore
+ partial class Kernel32
{
/// <summary>
/// WARNING: This method does not implicitly handle long paths. Use GetFullPath/PathHelper.
/// </summary>
- [DllImport(Libraries.CoreFile_L1, SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false, ExactSpelling = true)]
- internal static extern uint GetLongPathNameW(SafeHandle lpszShortPath, SafeHandle lpszLongPath, uint cchBuffer);
+ [DllImport(Libraries.Kernel32, SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false, ExactSpelling = true)]
+ internal static extern uint GetLongPathNameW(char[] lpszShortPath, char[] lpszLongPath, uint cchBuffer);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetTempFileNameW.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetTempFileNameW.cs
index f06d11b..d157a29 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetTempFileNameW.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetTempFileNameW.cs
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
partial class Interop
{
- partial class mincore
+ partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1, CharSet = CharSet.Unicode, SetLastError = true, BestFitMapping = false)]
+ [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true, BestFitMapping = false)]
internal static extern uint GetTempFileNameW(string tmpPath, string prefix, uint uniqueIdOrZero, [Out]StringBuilder tmpFileName);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetTempPathW.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetTempPathW.cs
index 0ccc27c..25ffcd5 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.GetTempPathW.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.GetTempPathW.cs
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
partial class Interop
{
- partial class mincore
+ partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1_2, CharSet = CharSet.Unicode, BestFitMapping = false)]
+ [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, BestFitMapping = false)]
internal static extern uint GetTempPathW(int bufferLen, [Out]StringBuilder buffer);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.LockFile.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.LockFile.cs
index ee9a98e..a21d00f 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.LockFile.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.LockFile.cs
@@ -9,12 +9,12 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
internal static extern bool LockFile(SafeFileHandle handle, int offsetLow, int offsetHigh, int countLow, int countHigh);
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
internal static extern bool UnlockFile(SafeFileHandle handle, int offsetLow, int offsetHigh, int countLow, int countHigh);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ReadFile_SafeHandle_IntPtr.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs
index 093a993..076f7f1 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ReadFile_SafeHandle_IntPtr.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs
@@ -8,10 +8,10 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
- unsafe internal static extern int ReadFile(
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
+ internal static extern unsafe int ReadFile(
SafeHandle handle,
byte* bytes,
int numBytesToRead,
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ReadFile_SafeHandle_NativeOverlapped.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs
index ac238cb..3ae65a8 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ReadFile_SafeHandle_NativeOverlapped.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs
@@ -9,10 +9,10 @@ using System.Threading;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
- unsafe internal static extern int ReadFile(
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
+ internal static extern unsafe int ReadFile(
SafeHandle handle,
byte* bytes,
int numBytesToRead,
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SECURITY_ATTRIBUTES.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SECURITY_ATTRIBUTES.cs
index 0f5c224..8d31f86 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SECURITY_ATTRIBUTES.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SECURITY_ATTRIBUTES.cs
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
[StructLayout(LayoutKind.Sequential)]
internal struct SECURITY_ATTRIBUTES
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SafeCreateFile.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SafeCreateFile.cs
index edfc66d..4192f56 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SafeCreateFile.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SafeCreateFile.cs
@@ -9,7 +9,7 @@ using Microsoft.Win32.SafeHandles;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); // WinBase.h
@@ -22,7 +22,7 @@ internal partial class Interop
String lpFileName,
int dwDesiredAccess,
System.IO.FileShare dwShareMode,
- ref Interop.mincore.SECURITY_ATTRIBUTES securityAttrs,
+ ref Interop.Kernel32.SECURITY_ATTRIBUTES securityAttrs,
FileMode dwCreationDisposition,
int dwFlagsAndAttributes,
IntPtr hTemplateFile)
@@ -31,8 +31,8 @@ internal partial class Interop
if (!handle.IsInvalid)
{
- int fileType = Interop.mincore.GetFileType(handle);
- if (fileType != Interop.mincore.FileTypes.FILE_TYPE_DISK)
+ int fileType = Interop.Kernel32.GetFileType(handle);
+ if (fileType != Interop.Kernel32.FileTypes.FILE_TYPE_DISK)
{
handle.Dispose();
throw new NotSupportedException(SR.NotSupported_FileStreamOnNonFiles);
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SecurityOptions.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SecurityOptions.cs
index 767d7f5..4a44024 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SecurityOptions.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SecurityOptions.cs
@@ -4,7 +4,7 @@
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
internal partial class SecurityOptions
{
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetEndOfFile.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetEndOfFile.cs
index ee0d3b4..e5d6004 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetEndOfFile.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetEndOfFile.cs
@@ -7,9 +7,9 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
internal static extern bool SetEndOfFile(SafeFileHandle hFile);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetErrorMode.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetErrorMode.cs
index a845990..caa2ce5 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetErrorMode.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetErrorMode.cs
@@ -6,9 +6,9 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.ErrorHandling, SetLastError = false, EntryPoint = "SetErrorMode", ExactSpelling = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = false, EntryPoint = "SetErrorMode", ExactSpelling = true)]
internal static extern uint SetErrorMode(uint newMode);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetFileInformationByHandle.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetFileInformationByHandle.cs
new file mode 100644
index 0000000..e31a453
--- /dev/null
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetFileInformationByHandle.cs
@@ -0,0 +1,39 @@
+// 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 Microsoft.Win32.SafeHandles;
+using System;
+using System.Runtime.InteropServices;
+
+internal partial class Interop
+{
+ internal partial class Kernel32
+ {
+ internal enum FILE_INFO_BY_HANDLE_CLASS : uint
+ {
+ FileBasicInfo = 0x0u,
+ FileStandardInfo = 0x1u,
+ FileNameInfo = 0x2u,
+ FileRenameInfo = 0x3u,
+ FileDispositionInfo = 0x4u,
+ FileAllocationInfo = 0x5u,
+ FileEndOfFileInfo = 0x6u,
+ FileStreamInfo = 0x7u,
+ FileCompressionInfo = 0x8u,
+ FileAttributeTagInfo = 0x9u,
+ FileIdBothDirectoryInfo = 0xAu,
+ FileIdBothDirectoryRestartInfo = 0xBu,
+ FileIoPriorityHintInfo = 0xCu,
+ FileRemoteProtocolInfo = 0xDu,
+ FileFullDirectoryInfo = 0xEu,
+ FileFullDirectoryRestartInfo = 0xFu,
+ FileStorageInfo = 0x10u,
+ FileAlignmentInfo = 0x11u,
+ FileIdInfo = 0x12u,
+ FileIdExtdDirectoryInfo = 0x13u,
+ FileIdExtdDirectoryRestartInfo = 0x14u,
+ MaximumFileInfoByHandleClass = 0x15u,
+ }
+ }
+}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetFilePointerEx.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetFilePointerEx.cs
index 09f8e1f..c0e5247 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetFilePointerEx.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.SetFilePointerEx.cs
@@ -7,9 +7,9 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
internal static extern bool SetFilePointerEx(SafeFileHandle hFile, long liDistanceToMove, out long lpNewFilePointer, uint dwMoveMethod);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.UnsafeCreateFile.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.UnsafeCreateFile.cs
index e7e4f05..9a5cd28 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.UnsafeCreateFile.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.UnsafeCreateFile.cs
@@ -8,13 +8,13 @@ using Microsoft.Win32.SafeHandles;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
internal static SafeFileHandle UnsafeCreateFile(
string lpFileName,
int dwDesiredAccess,
FileShare dwShareMode,
- ref Interop.mincore.SECURITY_ATTRIBUTES securityAttrs,
+ ref Interop.Kernel32.SECURITY_ATTRIBUTES securityAttrs,
FileMode dwCreationDisposition,
int dwFlagsAndAttributes,
IntPtr hTemplateFile)
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.WideCharToMultiByte.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WideCharToMultiByte.cs
index b1a2975..07271ca 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.WideCharToMultiByte.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WideCharToMultiByte.cs
@@ -7,9 +7,9 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
- [DllImport(Libraries.String_L1)]
+ [DllImport(Libraries.Kernel32)]
internal static extern unsafe int WideCharToMultiByte(
uint CodePage, uint dwFlags,
char* lpWideCharStr, int cchWideChar,
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.WriteFile_SafeHandle_IntPtr.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs
index 052ba3c..e7e868e 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.WriteFile_SafeHandle_IntPtr.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
// Note there are two different WriteFile prototypes - this is to use
// the type system to force you to not trip across a "feature" in
@@ -17,8 +17,8 @@ internal partial class Interop
// struct in a callback (or an EndWrite method called by that callback),
// and pass in an address for the numBytesRead parameter.
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
- internal static unsafe extern int WriteFile(SafeHandle handle, byte* bytes, int numBytesToWrite, out int numBytesWritten, IntPtr mustBeZero);
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
+ internal static extern unsafe int WriteFile(SafeHandle handle, byte* bytes, int numBytesToWrite, out int numBytesWritten, IntPtr mustBeZero);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.WriteFile_SafeHandle_NativeOverlapped.cs b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs
index e9d2953..dc1e975 100644
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.WriteFile_SafeHandle_NativeOverlapped.cs
+++ b/src/mscorlib/corefx/Interop/Windows/kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
using System.Threading;
internal partial class Interop
{
- internal partial class mincore
+ internal partial class Kernel32
{
// Note there are two different WriteFile prototypes - this is to use
// the type system to force you to not trip across a "feature" in
@@ -16,7 +16,7 @@ internal partial class Interop
// simultaneously: overlapped IO, free the memory for the overlapped
// struct in a callback (or an EndWrite method called by that callback),
// and pass in an address for the numBytesRead parameter.
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
- internal static unsafe extern int WriteFile(SafeHandle handle, byte* bytes, int numBytesToWrite, IntPtr numBytesWritten_mustBeZero, NativeOverlapped* lpOverlapped);
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
+ internal static extern unsafe int WriteFile(SafeHandle handle, byte* bytes, int numBytesToWrite, IntPtr numBytesWritten_mustBeZero, NativeOverlapped* lpOverlapped);
}
}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.Errors.cs b/src/mscorlib/corefx/Interop/Windows/mincore/Interop.Errors.cs
deleted file mode 100644
index 05b2250..0000000
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.Errors.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-// 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.
-
-internal partial class Interop
-{
- internal partial class mincore
- {
- internal partial class Errors
- {
- internal const int ERROR_SUCCESS = 0x0;
- internal const int ERROR_INVALID_FUNCTION = 0x1;
- internal const int ERROR_FILE_NOT_FOUND = 0x2;
- internal const int ERROR_PATH_NOT_FOUND = 0x3;
- internal const int ERROR_ACCESS_DENIED = 0x5;
- internal const int ERROR_INVALID_HANDLE = 0x6;
- internal const int ERROR_NOT_ENOUGH_MEMORY = 0x8;
- internal const int ERROR_INVALID_DATA = 0xD;
- internal const int ERROR_INVALID_DRIVE = 0xF;
- internal const int ERROR_NO_MORE_FILES = 0x12;
- internal const int ERROR_NOT_READY = 0x15;
- internal const int ERROR_BAD_LENGTH = 0x18;
- internal const int ERROR_SHARING_VIOLATION = 0x20;
- internal const int ERROR_LOCK_VIOLATION = 0x21;
- internal const int ERROR_HANDLE_EOF = 0x26;
- internal const int ERROR_FILE_EXISTS = 0x50;
- internal const int ERROR_INVALID_PARAMETER = 0x57;
- internal const int ERROR_BROKEN_PIPE = 0x6D;
- internal const int ERROR_INSUFFICIENT_BUFFER = 0x7A;
- internal const int ERROR_INVALID_NAME = 0x7B;
- internal const int ERROR_NEGATIVE_SEEK = 0x83;
- internal const int ERROR_DIR_NOT_EMPTY = 0x91;
- internal const int ERROR_BAD_PATHNAME = 0xA1;
- internal const int ERROR_LOCK_FAILED = 0xA7;
- internal const int ERROR_BUSY = 0xAA;
- internal const int ERROR_ALREADY_EXISTS = 0xB7;
- internal const int ERROR_BAD_EXE_FORMAT = 0xC1;
- internal const int ERROR_ENVVAR_NOT_FOUND = 0xCB;
- internal const int ERROR_FILENAME_EXCED_RANGE = 0xCE;
- internal const int ERROR_EXE_MACHINE_TYPE_MISMATCH = 0xD8;
- internal const int ERROR_PIPE_BUSY = 0xE7;
- internal const int ERROR_NO_DATA = 0xE8;
- internal const int ERROR_PIPE_NOT_CONNECTED = 0xE9;
- internal const int ERROR_MORE_DATA = 0xEA;
- internal const int ERROR_NO_MORE_ITEMS = 0x103;
- internal const int ERROR_PARTIAL_COPY = 0x12B;
- internal const int ERROR_ARITHMETIC_OVERFLOW = 0x216;
- internal const int ERROR_PIPE_CONNECTED = 0x217;
- internal const int ERROR_PIPE_LISTENING = 0x218;
- internal const int ERROR_OPERATION_ABORTED = 0x3E3;
- internal const int ERROR_IO_PENDING = 0x3E5;
- internal const int ERROR_NO_TOKEN = 0x3f0;
- internal const int ERROR_DLL_INIT_FAILED = 0x45A;
- internal const int ERROR_NOT_FOUND = 0x490;
- internal const int ERROR_NON_ACCOUNT_SID = 0x4E9;
- internal const int ERROR_NOT_ALL_ASSIGNED = 0x514;
- internal const int ERROR_UNKNOWN_REVISION = 0x519;
- internal const int ERROR_INVALID_OWNER = 0x51B;
- internal const int ERROR_INVALID_PRIMARY_GROUP = 0x51C;
- internal const int ERROR_NO_SUCH_PRIVILEGE = 0x521;
- internal const int ERROR_PRIVILEGE_NOT_HELD = 0x522;
- internal const int ERROR_INVALID_ACL = 0x538;
- internal const int ERROR_INVALID_SECURITY_DESCR = 0x53A;
- internal const int ERROR_INVALID_SID = 0x539;
- internal const int ERROR_BAD_IMPERSONATION_LEVEL = 0x542;
- internal const int ERROR_CANT_OPEN_ANONYMOUS = 0x543;
- internal const int ERROR_NO_SECURITY_ON_OBJECT = 0x546;
- internal const int ERROR_TRUSTED_RELATIONSHIP_FAILURE = 0x6FD;
- internal const int ERROR_RESOURCE_LANG_NOT_FOUND = 0x717;
- internal const int EFail = unchecked((int)0x80004005);
- internal const int E_FILENOTFOUND = unchecked((int)0x80070002);
- }
- }
-}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FileOperations.cs b/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FileOperations.cs
deleted file mode 100644
index 4369760..0000000
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.FileOperations.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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.
-
-internal partial class Interop
-{
- internal partial class mincore
- {
- internal partial class IOReparseOptions
- {
- internal const uint IO_REPARSE_TAG_FILE_PLACEHOLDER = 0x80000015;
- internal const uint IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003;
- }
-
- internal partial class FileOperations
- {
- internal const int OPEN_EXISTING = 3;
- internal const int COPY_FILE_FAIL_IF_EXISTS = 0x00000001;
-
- internal const int FILE_ACTION_ADDED = 1;
- internal const int FILE_ACTION_REMOVED = 2;
- internal const int FILE_ACTION_MODIFIED = 3;
- internal const int FILE_ACTION_RENAMED_OLD_NAME = 4;
- internal const int FILE_ACTION_RENAMED_NEW_NAME = 5;
-
- internal const int FILE_FLAG_BACKUP_SEMANTICS = 0x02000000;
- internal const int FILE_FLAG_FIRST_PIPE_INSTANCE = 0x00080000;
- internal const int FILE_FLAG_OVERLAPPED = 0x40000000;
-
- internal const int FILE_LIST_DIRECTORY = 0x0001;
- }
-
- internal const uint SEM_FAILCRITICALERRORS = 1;
- }
-}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.Idna.cs b/src/mscorlib/corefx/Interop/Windows/mincore/Interop.Idna.cs
deleted file mode 100644
index e14f16b..0000000
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.Idna.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-// 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;
-using System.Runtime.InteropServices;
-
-internal partial class Interop
-{
- internal partial class mincore
- {
- //
- // Idn APIs
- //
-
- [DllImport("api-ms-win-core-localization-l1-2-0.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern int IdnToAscii(
- uint dwFlags,
- IntPtr lpUnicodeCharStr,
- int cchUnicodeChar,
- [System.Runtime.InteropServices.OutAttribute()]
- IntPtr lpASCIICharStr,
- int cchASCIIChar);
-
- [DllImport("api-ms-win-core-localization-l1-2-0.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern int IdnToUnicode(
- uint dwFlags,
- IntPtr lpASCIICharStr,
- int cchASCIIChar,
- [System.Runtime.InteropServices.OutAttribute()]
- IntPtr lpUnicodeCharStr,
- int cchUnicodeChar);
-
- internal const int IDN_ALLOW_UNASSIGNED = 0x1;
- internal const int IDN_USE_STD3_ASCII_RULES = 0x2;
- }
-}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetFileInformationByHandle.cs b/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetFileInformationByHandle.cs
deleted file mode 100644
index 0519219..0000000
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.SetFileInformationByHandle.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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 Microsoft.Win32.SafeHandles;
-using System;
-using System.Runtime.InteropServices;
-
-internal partial class Interop
-{
- internal partial class mincore
- {
- [DllImport(Libraries.CoreFile_L1, SetLastError = true)]
- internal static extern bool SetFileInformationByHandle(SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, ref FILE_BASIC_INFO lpFileInformation, uint dwBufferSize);
-
- // Default values indicate "no change". Use defaults so that we don't force callsites to be aware of the default values
- internal unsafe static bool SetFileTime(
- SafeFileHandle hFile,
- long creationTime = -1,
- long lastAccessTime = -1,
- long lastWriteTime = -1,
- long changeTime = -1,
- uint fileAttributes = 0)
- {
- FILE_BASIC_INFO basicInfo = new FILE_BASIC_INFO()
- {
- CreationTime = creationTime,
- LastAccessTime = lastAccessTime,
- LastWriteTime = lastWriteTime,
- ChangeTime = changeTime,
- FileAttributes = fileAttributes
- };
-
- return SetFileInformationByHandle(hFile, FILE_INFO_BY_HANDLE_CLASS.FileBasicInfo, ref basicInfo, (uint)Marshal.SizeOf<FILE_BASIC_INFO>());
- }
-
- internal struct FILE_BASIC_INFO
- {
- internal long CreationTime;
- internal long LastAccessTime;
- internal long LastWriteTime;
- internal long ChangeTime;
- internal uint FileAttributes;
- }
-
- internal enum FILE_INFO_BY_HANDLE_CLASS : uint
- {
- FileBasicInfo = 0x0u,
- FileStandardInfo = 0x1u,
- FileNameInfo = 0x2u,
- FileRenameInfo = 0x3u,
- FileDispositionInfo = 0x4u,
- FileAllocationInfo = 0x5u,
- FileEndOfFileInfo = 0x6u,
- FileStreamInfo = 0x7u,
- FileCompressionInfo = 0x8u,
- FileAttributeTagInfo = 0x9u,
- FileIdBothDirectoryInfo = 0xAu,
- FileIdBothDirectoryRestartInfo = 0xBu,
- FileIoPriorityHintInfo = 0xCu,
- FileRemoteProtocolInfo = 0xDu,
- FileFullDirectoryInfo = 0xEu,
- FileFullDirectoryRestartInfo = 0xFu,
- FileStorageInfo = 0x10u,
- FileAlignmentInfo = 0x11u,
- FileIdInfo = 0x12u,
- FileIdExtdDirectoryInfo = 0x13u,
- FileIdExtdDirectoryRestartInfo = 0x14u,
- MaximumFileInfoByHandleClass = 0x15u,
- }
- }
-}
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs b/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs
deleted file mode 100644
index a0afed5..0000000
--- a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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;
-using System.Runtime.InteropServices;
-using Microsoft.Win32.SafeHandles;
-
-internal static partial class Interop
-{
- internal static partial class mincore
- {
- [DllImport(Libraries.ThreadPool, SetLastError = true)]
- internal static unsafe extern SafeThreadPoolIOHandle CreateThreadpoolIo(SafeHandle fl, [MarshalAs(UnmanagedType.FunctionPtr)] NativeIoCompletionCallback pfnio, IntPtr context, IntPtr pcbe);
-
- [DllImport(Libraries.ThreadPool)]
- internal static unsafe extern void CloseThreadpoolIo(IntPtr pio);
-
- [DllImport(Libraries.ThreadPool)]
- internal static unsafe extern void StartThreadpoolIo(SafeThreadPoolIOHandle pio);
-
- [DllImport(Libraries.ThreadPool)]
- internal static unsafe extern void CancelThreadpoolIo(SafeThreadPoolIOHandle pio);
- }
-
- internal delegate void NativeIoCompletionCallback(IntPtr instance, IntPtr context, IntPtr overlapped, uint ioResult, UIntPtr numberOfBytesTransferred, IntPtr io);
-}