Uh oh!
There was an error while loading. Please reload this page.
Annotate Windows interop declarations with [SupportedOSPlatform("windows")] - #132778
Annotate Windows interop declarations with [SupportedOSPlatform("windows")]#132778pavelsavara with Copilot wants to merge 20 commits into
Conversation
|
Azure Pipelines: 16 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
This comment was marked as outdated.
This comment was marked as outdated.
…oreLib callers Co-authored-by: pavelsavara <271576+pavelsavara@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
…form] across modules
…m] (coarse; method-level for WinSock)
… + guard GetRandomBytes
…-platform) + guard CoreLib callers
…-platform) + guard CoreLib callers
…(wraps windows-only GetConsoleMode)
…EventLog, NameResolution)
…/ [SupportedOSPlatform]
…ead of scoped pragmas
pavelsavara
commented
Aug 28, 2026
/azp run runtime-extra-platforms |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
pavelsavara
commented
Aug 28, 2026
/azp run runtime-extra-platforms |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR broadly annotates Windows-specific interop declarations with [SupportedOSPlatform("windows")] and updates/gates callers (primarily via CA1416 suppressions in Windows-only or Windows-gated code) so platform-compatibility analysis and wasm P/Invoke scanning can correctly skip Windows-only entrypoints.
Changes:
- Add
[SupportedOSPlatform("windows")]annotations across Windows interop declarations undersrc/libraries/Common/src/Interop/Windows/**(and select other Windows-only declarations). - Add
#pragma warning disable CA1416(and a few scoped disable/restore blocks) in Windows-only or Windows-gated call sites across CoreLib/Common/NativeAOT. - Add/adjust a few Windows-only managed helpers / callbacks to carry platform annotations.
Reviewed changes
Copilot reviewed 300 out of 758 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/WindowsThreadPool.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/WaitHandle.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/TimerQueue.WindowsThreadPool.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolBoundHandle.WindowsThreadPool.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.WindowsThreadPool.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.IO.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/LowLevelFutex.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Security/SecureString.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignalRegistration.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeMemory.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.cs | Scoped CA1416 suppression around TARGET_WINDOWS interop call |
| src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs | Scoped CA1416 suppression around TARGET_WINDOWS COM interop |
| src/libraries/System.Private.CoreLib/src/System/IO/Strategies/FileStreamHelpers.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/PathHelper.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/Path.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/FileSystemInfo.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEnumerator.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEntry.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/DriveInfoInternal.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/IO/Directory.Windows.cs | File-level CA1416 suppression for Windows implementation called by cross-platform partial |
| src/libraries/System.Private.CoreLib/src/System/Guid.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.Nls.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/Normalization.Nls.cs | File-level CA1416 suppression for Windows-only NLS interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/IdnMapping.Nls.cs | File-level CA1416 suppression for Windows-only NLS interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Nls.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Nls.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/Environment.Variables.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSourceHelper.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Diagnostics/Stopwatch.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/Diagnostics/DebugProvider.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/System/DateTime.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/libraries/System.Private.CoreLib/src/System/AppDomain.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeThreadPoolIOHandle.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs | File-level CA1416 suppression for Windows-only registry interop usage |
| src/libraries/System.Private.CoreLib/src/Internal/Win32/RegistryKey.cs | File-level CA1416 suppression for Windows-only registry interop usage |
| src/libraries/System.Private.CoreLib/src/Internal/Console.Windows.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs | Add SupportedOSPlatform to UnmanagedCallersOnly callback |
| src/libraries/System.Data.OleDb/src/UnsafeNativeMethods.COMWrappers.cs | Add SupportedOSPlatform to Windows-only LibraryImport |
| src/libraries/Common/src/System/Threading/AsyncOverSyncWithIoCancellation.cs | Add SupportedOSPlatform to Windows-only helper type |
| src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs | File-level CA1416 suppression for Windows implementation invoked by cross-platform partial |
| src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs | File-level CA1416 suppression for Windows implementation invoked by cross-platform partial |
| src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeTokenHandle.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeThreadHandle.cs | File-level CA1416 suppression for Windows-gated interop usage |
| src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSUnRegisterSessionNotification.cs | Mark WtsApi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.WTSRegisterSessionNotification.cs | Mark WtsApi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WtsApi32/Interop.Constants.cs | Mark WtsApi32 constants as Windows-only |
| src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs | Mark Wldap32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ber.cs | Mark Wldap32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Wkscli/Interop.NetWkstaGetInfo.cs | Mark Wkscli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSARecv.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.gethostname.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.closesocket.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinSock/Interop.accept.cs | Mark Winsock P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutWrite.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutRestart.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutReset.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutPrepareHeader.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutPause.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutOpen.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutGetNumDevs.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutGetDevCaps.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutClose.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.PlaySound.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.MMSYSERR.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioRead.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioOpen.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioDescend.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioClose.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.mmioAscend.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinMm/Interop.MMCKINFO.cs | Mark WinMM interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp.cs | Mark WinHTTP interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs | Mark WinHTTP types/constants as Windows-only |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.SafeWinHttpHandle.cs | Mark WinHTTP safe handle as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketSend.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketReceive.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketGetAction.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketDeleteHandle.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateServerHandle.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCreateClientHandle.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketCompleteAction.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginServerHandshake.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketBeginClientHandshake.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketAbortHandle.cs | Mark Windows WebSocket interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/WebSocket/Interop.Structs.cs | Mark Windows WebSocket structs as Windows-only |
| src/libraries/Common/src/Interop/Windows/Version/Interop.VSFixedFileInfo.cs | Mark Version interop structs as Windows-only |
| src/libraries/Common/src/Interop/Windows/Version/Interop.VerQueryValue.cs | Mark Version interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoSizeEx.cs | Mark Version interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Version/Interop.GetFileVersionInfoEx.cs | Mark Version interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfoType.cs | Mark Version interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Version/Interop.FileVersionInfo.cs | Mark Version interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.WndProc.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.WNDCLASS.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.Win32SystemColors.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.WaitForInputIdle.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.USEROBJECTFLAGS.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.UnregisterClass.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.TranslateMessage.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.SystemParametersInfo.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLongPtr.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.SetWindowLong.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.SetTimer.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLongPtr.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.SetClassLong.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessageTimeout.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.SendMessage.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterWindowMessage.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.RegisterClass.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.PostQuitMessage.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.PostMessage.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.MsgWaitForMultipleObjectsEx.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.MSG.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.MessageBeep.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.LoadString.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.KillTimer.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindowVisible.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.IsWindow.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.HIGHCONTRASTW.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowThreadProcessId.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextW.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowTextLengthW.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindowLong.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetWindow.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetUserObjectInformation.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetSysColor.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetProcessWindowStation.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetMessage.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetKeyState.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.GetClassInfo.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.FindWindow.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.EnumWindows.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.DispatchMessage.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.DestroyWindow.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.DefWindowProc.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.CreateWindowEx.cs | Mark User32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/User32/Interop.Constants.cs | Mark User32 constants as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ucrtbase/Interop.MemAlloc.cs | Mark ucrtbase interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/NegotiationInfoClass.cs | Mark SspiCli helper as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.TokenSource.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SecurityLogonType.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.QuotaLimits.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLookupAuthenticationPackage.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaLogonUser.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaGetLogonSessionData.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaFreeReturnBuffer.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaDeregisterLogonProcess.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LsaConnectUntrusted.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbS4uLogin.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.KerbLogonSubmitType.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/SspiCli/Interop.AuthenticationPackageNames.cs | Mark SspiCli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs | Mark Shell32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Shell32/Interop.ShellExecuteExW.cs | Mark Shell32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Secur32/Interop.LsaLogonProcessSafeHandle.cs | Mark Secur32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Secur32/Interop.LsaFreeReturnBuffer.cs | Mark Secur32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Secur32/Interop.LsaDeregisterLogonProcess.cs | Mark Secur32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Secur32/Interop.LsaConnectUntrusted.cs | Mark Secur32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Secur32/Interop.LsaCallAuthenticationPackage.cs | Mark Secur32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Secur32/Interop.GetUserNameExW.cs | Mark Secur32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/PerfCounter/Interop.PerformanceData.cs | Mark PerfCounter interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Pdh/Interop.PdhFormatFromRawValue.cs | Mark PDH interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/OleAut32/Interop.VariantClear.cs | Mark OleAut32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/OleAut32/Interop.VariantChangeTypeEx.cs | Mark OleAut32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysFreeString.cs | Mark OleAut32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs | Mark OleAut32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs | Mark OleAut32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/OleAut32/Interop.SetErrorInfo.cs | Mark OleAut32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/OleAut32/Interop.GetErrorInfo.cs | Mark OleAut32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.PropVariantClear.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoUninitialize.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoInitializeEx.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetObjectContext.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetContextToken.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetApartmentType.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Ole32/Interop.CLSIDFromProgID.cs | Mark Ole32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_PROCESS_INFORMATION.cs | Mark NtDll interop types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.SYSTEM_LEAP_SECOND_INFORMATION.cs | Mark NtDll interop types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlNtStatusToDosError.cs | Mark NtDll interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlInitUnicodeString.cs | Mark NtDll interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs | Mark NtDll interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.PROCESS_BASIC_INFORMATION.cs | Mark NtDll interop types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs | Mark NtDll interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs | Mark NtDll interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs | Mark NtDll interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryDirectoryFile.cs | Mark NtDll interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs | Mark NtDll interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.IO_STATUS_BLOCK.cs | Mark NtDll interop types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_INFORMATION_CLASS.cs | Mark NtDll interop types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_DIR_INFORMATION.cs | Mark NtDll interop types as Windows-only |
| src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Normalization.cs | Mark Normaliz interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Normaliz/Interop.Idna.cs | Mark Normaliz interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netutils/Interop.NetApiBufferFree.cs | Mark Netutils interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.NetApiBufferFree.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.I_NetLogonControl2.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DsRoleGetPrimaryDomainInformation.cs | Mark Netapi32 types as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DsRoleFreeMemory.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DsGetSiteName.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DsGetDcOpen.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DsGetDcNext.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DsGetDcName.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DsGetDcClose.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DsEnumerateDomainTrustsW.cs | Mark Netapi32 interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DS_DOMAINTRUST_FLAG.cs | Mark Netapi32 types as Windows-only |
| src/libraries/Common/src/Interop/Windows/Netapi32/Interop.DS_DOMAIN_TRUSTS.cs | Mark Netapi32 types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.UiPolicy.cs | Mark NCrypt interop types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.SignVerify.cs | Mark NCrypt interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Properties.cs | Mark NCrypt interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptOpenStorageProvider.cs | Mark NCrypt interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptFreeObject.cs | Mark NCrypt interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveSecretAgreement.cs | Mark NCrypt interop types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs | Mark NCrypt interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDecapsulateEncapsulate.cs | Mark NCrypt interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptBuffer.cs | Mark NCrypt interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.Keys.cs | Mark NCrypt constants as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.ErrorCode.cs | Mark NCrypt types as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.EncryptDecrypt.cs | Mark NCrypt interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/NCrypt/Interop.AsymmetricPaddingMode.cs | Mark NCrypt types as Windows-only |
| src/libraries/Common/src/Interop/Windows/Mincore/Interop.WaitOnAddress.cs | Mark Mincore interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Logoncli/Interop.DsGetDcName.cs | Mark Logoncli interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WriteFile_IntPtr.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.VirtualQuery.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Sleep.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetLastError.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ResumeThread.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadFile_IntPtr.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetUserDefaultLCID.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetTickCount64.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetStdHandle.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetNativeSystemInfo.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLastError.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentThread.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessorNumberEx.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcess.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleTitle.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleOutputCP.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetConsoleCP.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommandLine.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeLibrary.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindClose.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ExitProcess.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs | Mark Kernel32 helper as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CloseHandle.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Beep.cs | Mark Kernel32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs | Mark IpHlpApi interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.IP_ADDR_STRING.cs | Mark IpHlpApi structs as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ICMP.cs | Mark IpHlpApi types/constants as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.GetNetworkParams.cs | Mark IpHlpApi P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.FIXED_INFO.cs | Mark IpHlpApi structs as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ErrorCodes.cs | Mark IpHlpApi constants as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ConvertInterfaceNameToLuid.cs | Mark IpHlpApi P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ConvertInterfaceLuidToName.cs | Mark IpHlpApi P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ConvertInterfaceLuidToIndex.cs | Mark IpHlpApi P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.ConvertInterfaceIndexToLuid.cs | Mark IpHlpApi P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs | Mark HttpApi interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/HttpApi/Interop.ErrorCodes.cs | Mark HttpApi constants as Windows-only |
| src/libraries/Common/src/Interop/Windows/Dsrole/Interop.DsRoleGetPrimaryDomainInformation.cs | Mark Dsrole types as Windows-only |
| src/libraries/Common/src/Interop/Windows/Dsrole/Interop.DsRoleFreeMemory.cs | Mark Dsrole P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Dnsapi/Interop.DnsTypes.cs | Mark Dnsapi types as Windows-only |
| src/libraries/Common/src/Interop/Windows/Dnsapi/Interop.DnsApi.cs | Mark Dnsapi interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/CryptUI/Interop.CryptUIDlgCertificate.cs | Mark CryptUI interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptEncodeObject.cs | Mark Crypt32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CryptDecodeObject.cs | Mark Crypt32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Credui/Interop.CredUIParseUserName.cs | Mark Credui interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptVerifySignature.cs | Mark BCrypt P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptSignHash.cs | Mark BCrypt P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptSecretAgreement.cs | Mark BCrypt P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs | File-level CA1416 suppression for cross-platform RNG entrypoint |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptFinalizeKey.cs | Mark BCrypt P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDuplicateHash.cs | Mark BCrypt P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroySecret.cs | Mark BCrypt P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyKey.cs | Mark BCrypt P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptDestroyHash.cs | Mark BCrypt P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Authz/Interop.AuthzInitializeResourceManager.cs | Mark Authz interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Authz/Interop.AuthzInitializeContextFromSid.cs | Mark Authz interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Authz/Interop.AuthzGetInformationFromContext.cs | Mark Authz interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegFlushKey.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCloseKey.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetSecurityDescriptorLength.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetLengthSid.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteString.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventUnregister.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventSetInformation.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventRegister.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptEncrypt.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptDecrypt.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CryptCreateHash.cs | Mark Advapi32 P/Invoke as Windows-only |
| src/libraries/Common/src/Interop/Windows/Activeds/Interop.FreeADsMem.cs | Mark Activeds interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Activeds/Interop.ADsSetLastError.cs | Mark Activeds interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Activeds/Interop.ADsOpenObject.cs | Mark Activeds interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Activeds/Interop.ADsGetLastError.cs | Mark Activeds interop as Windows-only |
| src/libraries/Common/src/Interop/Windows/Activeds/Interop.ADsEncodeBinaryData.cs | Mark Activeds interop as Windows-only |
| src/coreclr/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs | File-level CA1416 suppression for Windows-only OLE Automation interop |
| src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
| src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/FrozenObjectHeapManager.Windows.cs | File-level CA1416 suppression for Windows-only interop usage |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| #if TARGET_WINDOWS | ||
| private static unsafe IntPtr GetProcAddressWithMangling(IntPtr hModule, byte* methodName, MethodFixupCell* pCell) | ||
| { | ||
| #pragma warning disable CA1416 // Only reached on Windows via TARGET_WINDOWS. |
There was a problem hiding this comment.
Why do we need suppressions like this? Is this a bug in the analyzer? Can you link the bug so we can delete these once the bug is fixed?
There was a problem hiding this comment.
The platform neutral CoreLib is compiled with MSBuild TargetOS set to the same platform as the machine doing the compilation.
Therefore TargetsWindows is true.
Therefore #if TARGET_WINDOWS is true, not false.
As a consequence, platform neutral CoreLib has those calls included and we get the CA1416.
Any idea what to do with that would be appreciated.
There was a problem hiding this comment.
What is platform neutral corelib? Where/how do we build it and what's the purpose?
There was a problem hiding this comment.
sorry, "neutral corelib" is wrong angle. And maybe I'm confused about TargetsWindows values.
It's those Windows P/Invokes sit in the unconditionally-compiled part of CoreLib, so they land in every CoreLib flavor including browser.
The NLS/Normaliz declarations aren't under TargetsWindows at all — they're unconditional.
MichalStrehovsky
commented
Aug 31, 2026
How are we ending up with these DllImports under WASM in the first place? I would have expect us not to compile these in the first place under WASM. And why Windows specifically and not macOS/Linux? |
pavelsavara
commented
Aug 31, 2026
Platform neutral CoreLib contains windows calls.
I think we ship the runtime pack from windows machine. This PR focuses on Windows only and I think we need to annotate OSX and Unix too (for consistency). I just wanted to do that in a separate PRs. |
Annotates the platform-specific
DllImport/LibraryImport/UnmanagedCallersOnlydeclarations undersrc/libraries/Common/src/Interop/Windows/**with[SupportedOSPlatform("windows")], and annotates or gates their callers accordingly.This lets the wasm CoreCLR P/Invoke scan (
PInvokeCollector) skip these declarations onbrowser/wasi— removingWASM0066noise at the source — and makes them visible to CA1416 platform-compatibility analysis.Contributes to #132776
Scope
src/libraries/Common/src/Interop/Windows/. Unix/macOS interop is not part of this change.#if NETso the shared files still compile fornetstandard/netfxconsumers (e.g.TestUtilitiesonnet481), whereSupportedOSPlatformAttributedoes not exist.Approach
UnmanagedCallersOnlydeclaration is annotated. Type-level (coarse) annotation is used on theInterop.partial class where safe; per-method annotation is used where a module'sconst/struct/enummembers are consumed by cross-platform code — e.g. the public enums inSystem.Net.Primitives(SslProtocols,SocketError, …) whose values derive fromInterop.SChannel.*/Interop.Winsock.*/Interop.Crypt32.*— so those members stay platform-neutral.Kernel32,Advapi32,Crypt32,BCrypt, andWinSockare per-method; the remaining modules are type-level.[SupportedOSPlatform("windows")]whenever all of its callers are Windows-only, rather than suppressing the warning with a pragma. A#pragma warning disable CA1416is used only where the requirement cannot be expressed as an annotation: (1) Windows-only-compiled implementation files (*.Windows.cs) whose members are invoked by their cross-platform partial siblings, and (2) the few helpers whose managed entry point is genuinely cross-platform —Interop.GetRandomBytes(the platform-abstracted RNG) andKernel32.GetMessage(reached through the portableWin32Marshalerror path).System.Private.CoreLibreach Windows-only interop only through compile-time gates (#if TARGET_WINDOWS,#if FEATURE_COMINTEROP,*.Windows.cs,*.Nls.cs) that CA1416 cannot observe; those files carry scoped or file-level suppressions where a Windows annotation would incorrectly propagate to portable code.Validation
System.Private.CoreLibbuilds clean with no CA1416 diagnostics on Windows (CoreCLR and NativeAOT) and onbrowser/wasm.System.Net.*,System.Security.Cryptography,System.Diagnostics.*,System.IO.*,System.Console,System.DirectoryServices.Protocols, and others — build clean across all target frameworks, includingbrowser,wasi,unix,linux,osx, andandroid.netstandard/net481consumers of the shared interop build clean.Note
This pull request was authored with GitHub Copilot.