3 writes to NativeErrorCode
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (3)
42NativeErrorCode = error; 58NativeErrorCode = Marshal.GetLastPInvokeError(); 65NativeErrorCode = info.GetInt32(nameof(NativeErrorCode));
31 references to NativeErrorCode
Microsoft.AspNetCore.Server.HttpSys (2)
HttpSysException.cs (1)
38return NativeErrorCode;
NativeInterop\DisconnectListener.cs (1)
93statusCode = (uint)exception.NativeErrorCode;
Microsoft.Build (3)
BackEnd\Components\Communications\NodeLauncher.cs (2)
170e.NativeErrorCode.ToString(CultureInfo.InvariantCulture), 174throw new NodeFailedToLaunchException(e.NativeErrorCode.ToString(CultureInfo.InvariantCulture), e.Message);
NativeWin32Exception.cs (1)
14/// A possibly-recoverable exception wrapping a failed native call. The <see cref="Win32Exception.NativeErrorCode" /> captures the
Microsoft.Build.Framework (1)
NativeMethods.cs (1)
1216catch (Win32Exception e) when (e.NativeErrorCode == ERROR_ACCESS_DENIED)
Microsoft.Build.Tasks.Core (1)
NativeWin32Exception.cs (1)
14/// A possibly-recoverable exception wrapping a failed native call. The <see cref="Win32Exception.NativeErrorCode" /> captures the
Microsoft.Build.Utilities.Core (1)
NativeWin32Exception.cs (1)
14/// A possibly-recoverable exception wrapping a failed native call. The <see cref="Win32Exception.NativeErrorCode" /> captures the
MSBuildTaskHost (1)
NativeMethods.cs (1)
1216catch (Win32Exception e) when (e.NativeErrorCode == ERROR_ACCESS_DENIED)
PresentationCore (2)
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (2)
259if (e.NativeErrorCode != 1400) // ERROR_INVALID_WINDOW_HANDLE 262Debug.WriteLine(String.Format("Dispatcher.CriticalInvokeShutdown() Failed. Error={0}", e.NativeErrorCode));
System.Net.HttpListener (5)
System\Net\HttpListenerException.cs (5)
16if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); 21if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); 26if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); 34if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); 39public override int ErrorCode => NativeErrorCode;
System.Net.NetworkInformation (1)
src\libraries\Common\src\System\Net\NetworkInformation\NetworkInformationException.cs (1)
67return NativeErrorCode;
System.Net.Primitives (2)
System\Net\SocketException.cs (2)
59if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); 62public override int ErrorCode => base.NativeErrorCode;
System.Net.Security (1)
System\Net\Security\NegotiateStream.cs (1)
933throw e.NativeErrorCode switch
System.Net.WebSockets (1)
System\Net\WebSockets\WebSocketException.cs (1)
117return base.NativeErrorCode;
System.Private.CoreLib (10)
src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (10)
65NativeErrorCode = info.GetInt32(nameof(NativeErrorCode)); 73info.AddValue(nameof(NativeErrorCode), NativeErrorCode); 82/// Returns a string that contains the <see cref="NativeErrorCode"/>, or <see cref="Exception.HResult"/>, or both. 84/// <returns>A string that represents the <see cref="NativeErrorCode"/>, or <see cref="Exception.HResult"/>, or both.</returns> 87if (NativeErrorCode == 0 || NativeErrorCode == HResult) 95string nativeErrorString = NativeErrorCode < 0 96? $"0x{NativeErrorCode:X8}" 97: NativeErrorCode.ToString(CultureInfo.InvariantCulture);