diff --git a/src/libraries/Common/src/Interop/Windows/Interop.Libraries.cs b/src/libraries/Common/src/Interop/Windows/Interop.Libraries.cs index 692cdd783f2f5f..74c014c7179935 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.Libraries.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.Libraries.cs @@ -7,16 +7,12 @@ internal static partial class Libraries { internal const string Advapi32 = "advapi32.dll"; internal const string BCrypt = "BCrypt.dll"; - internal const string CoreComm_L1_1_1 = "api-ms-win-core-comm-l1-1-1.dll"; - internal const string CoreComm_L1_1_2 = "api-ms-win-core-comm-l1-1-2.dll"; internal const string Crypt32 = "crypt32.dll"; internal const string CryptUI = "cryptui.dll"; - internal const string Error_L1 = "api-ms-win-core-winrt-error-l1-1-0.dll"; internal const string Gdi32 = "gdi32.dll"; internal const string HttpApi = "httpapi.dll"; internal const string IpHlpApi = "iphlpapi.dll"; internal const string Kernel32 = "kernel32.dll"; - internal const string Memory_L1_3 = "api-ms-win-core-memory-l1-1-3.dll"; internal const string Mswsock = "mswsock.dll"; internal const string NCrypt = "ncrypt.dll"; internal const string NtDll = "ntdll.dll"; @@ -24,7 +20,6 @@ internal static partial class Libraries internal const string Ole32 = "ole32.dll"; internal const string OleAut32 = "oleaut32.dll"; internal const string PerfCounter = "perfcounter.dll"; - internal const string RoBuffer = "api-ms-win-core-winrt-robuffer-l1-1-0.dll"; internal const string Secur32 = "secur32.dll"; internal const string Shell32 = "shell32.dll"; internal const string SspiCli = "sspicli.dll"; @@ -37,7 +32,6 @@ internal static partial class Libraries internal const string Ws2_32 = "ws2_32.dll"; internal const string Wtsapi32 = "wtsapi32.dll"; internal const string CompressionNative = "clrcompression.dll"; - internal const string CoreWinRT = "api-ms-win-core-winrt-l1-1-0.dll"; internal const string MsQuic = "msquic.dll"; internal const string HostPolicy = "hostpolicy.dll"; } diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetCommPorts.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetCommPorts.cs deleted file mode 100644 index 1ed2e964b7d4cb..00000000000000 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetCommPorts.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. - -using System; -using System.Runtime.InteropServices; - -internal partial class Interop -{ - internal partial class mincore - { - [DllImport(Libraries.CoreComm_L1_1_2, SetLastError = true)] - private static extern unsafe int GetCommPorts( - uint* lpPortNumbers, - uint uPortNumbersCount, - out uint puPortNumbersFound); - - internal static unsafe int GetCommPorts( - Span portNumbers, - out uint portNumbersFound) - { - fixed (uint* portNumbersBuffer = &MemoryMarshal.GetReference(portNumbers)) - { - return GetCommPorts(portNumbersBuffer, (uint)portNumbers.Length, out portNumbersFound); - } - } - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetRestrictedErrorInfo.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetRestrictedErrorInfo.cs deleted file mode 100644 index 8bfeebb4f3a30e..00000000000000 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.GetRestrictedErrorInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.WindowsRuntime; - -internal partial class Interop -{ - internal partial class mincore - { - [DllImport(Libraries.Error_L1, PreserveSig = false)] - internal static extern IRestrictedErrorInfo GetRestrictedErrorInfo(); - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenCommPort.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenCommPort.cs deleted file mode 100644 index 60a3408b3631a4..00000000000000 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenCommPort.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.Win32.SafeHandles; -using System; -using System.IO; -using System.Runtime.InteropServices; - -internal partial class Interop -{ - internal partial class mincore - { - [DllImport(Libraries.CoreComm_L1_1_1, SetLastError = true)] - internal static extern SafeFileHandle OpenCommPort( - uint uPortNumber, - int dwDesiredAccess, - int dwFlagsAndAttributes); - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenFileMappingFromApp.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenFileMappingFromApp.cs deleted file mode 100644 index 01448ecf285319..00000000000000 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.OpenFileMappingFromApp.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.Win32.SafeHandles; -using System; -using System.Runtime.InteropServices; - -internal partial class Interop -{ - internal partial class mincore - { - [DllImport(Libraries.Memory_L1_3, CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern SafeMemoryMappedFileHandle OpenFileMappingFromApp( - int DesiredAccess, - [MarshalAs(UnmanagedType.Bool)] bool InheritHandle, - string Name); - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetActivationFactory.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetActivationFactory.cs deleted file mode 100644 index a8c9a93d592059..00000000000000 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetActivationFactory.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.Win32.SafeHandles; -using System; -using System.Runtime.InteropServices; - -internal partial class Interop -{ - internal partial class mincore - { - [DllImport(Libraries.CoreWinRT, PreserveSig = true)] - internal static extern int RoGetActivationFactory( - [MarshalAs(UnmanagedType.HString)] string activatableClassId, - [In] ref Guid iid, - [Out, MarshalAs(UnmanagedType.IInspectable)] out object factory); - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetBufferMarshaler.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetBufferMarshaler.cs deleted file mode 100644 index 08ba5406387323..00000000000000 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.RoGetBufferMarshaler.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Collections.Generic; -using System.Collections; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -internal partial class Interop -{ - internal partial class mincore - { - [DllImport(Libraries.RoBuffer, CallingConvention = CallingConvention.StdCall, PreserveSig = true)] - internal static extern int RoGetBufferMarshaler(out IMarshal bufferMarshalerPtr); - } -} diff --git a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.VirtualAllocFromApp.cs b/src/libraries/Common/src/Interop/Windows/Mincore/Interop.VirtualAllocFromApp.cs deleted file mode 100644 index 179e6263ab254d..00000000000000 --- a/src/libraries/Common/src/Interop/Windows/Mincore/Interop.VirtualAllocFromApp.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.Win32.SafeHandles; -using System; -using System.Runtime.InteropServices; - -internal partial class Interop -{ - internal partial class mincore - { - [DllImport(Libraries.Memory_L1_3, CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern IntPtr VirtualAllocFromApp( - SafeHandle BaseAddress, - UIntPtr Size, - int AllocationType, - int Protection); - } -} diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/IRestrictedErrorInfo.cs b/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/IRestrictedErrorInfo.cs deleted file mode 100644 index 1cf4566c761647..00000000000000 --- a/src/libraries/Common/src/System/Runtime/InteropServices/WindowsRuntime/IRestrictedErrorInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; - -namespace System.Runtime.InteropServices.WindowsRuntime -{ - [ComImport] - [Guid("82BA7092-4C88-427D-A7BC-16DD93FEB67E")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IRestrictedErrorInfo - { - void GetErrorDetails([MarshalAs(UnmanagedType.BStr)] out string description, - out int error, - [MarshalAs(UnmanagedType.BStr)] out string restrictedDescription, - [MarshalAs(UnmanagedType.BStr)] out string capabilitySid); - - void GetReference([MarshalAs(UnmanagedType.BStr)] out string reference); - } -}