73 references to Win32Exception
Microsoft.AspNetCore.Server.HttpSys (3)
HttpSysException.cs (2)
17: base(Marshal.GetLastWin32Error()) 22: base(errorCode)
NativeInterop\DisconnectListener.cs (1)
103Log.UnknownDisconnectError(_logger, new Win32Exception((int)statusCode));
Microsoft.Build (1)
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
Microsoft.Build.Engine.OM.UnitTests (1)
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
Microsoft.Build.Tasks.Core (1)
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
Microsoft.Build.Utilities.Core (1)
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
7830throw new Win32Exception(Marshal.GetLastWin32Error());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\ResourceTests.cs (2)
60throw new Win32Exception(Marshal.GetLastWin32Error()); 150throw new Win32Exception(Marshal.GetLastWin32Error());
Microsoft.CodeAnalysis.Test.Utilities (3)
Win32Res.cs (3)
33throw new Win32Exception(Marshal.GetLastWin32Error()); 38throw new Win32Exception(Marshal.GetLastWin32Error()); 42throw new Win32Exception(Marshal.GetLastWin32Error());
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
6854Throw New Win32Exception(Marshal.GetLastWin32Error())
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
Emit\ResourceTests.vb (2)
51Throw New Win32Exception(Marshal.GetLastWin32Error()) 138Throw New Win32Exception(Marshal.GetLastWin32Error())
Microsoft.DotNet.SignCheckLibrary (4)
Verification\AuthentiCode.cs (3)
124throw new Win32Exception(Marshal.GetLastWin32Error()); 132throw new Win32Exception(Marshal.GetLastWin32Error()); 138throw new Win32Exception(Marshal.GetLastWin32Error());
Verification\AuthentiCodeVerifier.cs (1)
52string errorMessage = new Win32Exception(Marshal.GetLastWin32Error()).Message;
Microsoft.VisualStudio.LanguageServices (2)
Utilities\ClipboardHelpers.cs (2)
136throw new Win32Exception(win32Error); 148throw new Win32Exception(win32Error);
MSBuild (1)
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
PresentationCore (13)
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
479throw new Win32Exception(Marshal.GetLastWin32Error());
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
56throw new System.ComponentModel.Win32Exception(win32Err);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
86throw new Win32Exception( hr ) ;
System\Windows\dataobject.cs (8)
972throw new System.ComponentModel.Win32Exception(win32Error); 1001throw new System.ComponentModel.Win32Exception(win32Error); 1014throw new System.ComponentModel.Win32Exception(win32Error); 1029throw new System.ComponentModel.Win32Exception(win32Error); 1044throw new System.ComponentModel.Win32Exception(win32Error); 1058throw new System.ComponentModel.Win32Exception(win32Error); 1151throw new System.ComponentModel.Win32Exception(win32Error); 1386throw new System.ComponentModel.Win32Exception(win32Error);
System\Windows\Input\Cursor.cs (1)
196throw new Win32Exception(errorCode);
System\Windows\Input\TextCompositionManager.cs (1)
397throw new System.ComponentModel.Win32Exception(win32Err);
PresentationFramework (3)
System\windows\Documents\CaretElement.cs (2)
1004throw new System.ComponentModel.Win32Exception(win32Error); 1095throw new System.ComponentModel.Win32Exception(win32Error);
System\Windows\Documents\TextFindEngine.cs (1)
583throw new System.ComponentModel.Win32Exception(win32Error);
System.Diagnostics.Process (2)
System\Diagnostics\Process.Unix.cs (2)
269throw new Win32Exception(errno); // match Windows exception 414throw new Win32Exception(Interop.Errors.ERROR_NO_ASSOCIATION);
System.IO.Ports (1)
System\IO\Ports\InternalResources.cs (1)
19return new Win32Exception(errorCode).Message;
System.Net.HttpListener (2)
System\Net\HttpListenerException.cs (2)
14public HttpListenerException() : base(Marshal.GetLastPInvokeError()) 19public HttpListenerException(int errorCode) : base(errorCode)
System.Net.NetworkInformation (4)
src\libraries\Common\src\System\Net\NetworkInformation\NetworkInformationException.cs (3)
25public NetworkInformationException() : base(Marshal.GetLastPInvokeError()) 34public NetworkInformationException(int errorCode) : base(errorCode) 46internal NetworkInformationException(SocketError socketError) : base((int)socketError)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (1)
198throw new Win32Exception(result.Info().RawErrno);
System.Net.Primitives (2)
System\Net\SocketException.cs (1)
39internal SocketException(SocketError socketError) : base(GetNativeErrorForSocketError(socketError))
System\Net\SocketException.Unix.cs (1)
15internal SocketException(SocketError errorCode, uint platformError) : base((int)platformError)
System.Net.Security (5)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (3)
338throw new Win32Exception(NTE_FAIL); 371throw new Win32Exception(NTE_FAIL); 463throw new Win32Exception(NTE_FAIL);
System\Net\Security\NegotiateStream.cs (2)
830Win32Exception win32Exception = new Win32Exception(errorCode); 932var e = new Win32Exception((int)error);
System.Net.WebSockets (1)
System\Net\WebSockets\WebSocketException.cs (1)
44: base(nativeError)
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (1)
26public Win32Exception() : this(Marshal.GetLastPInvokeError())
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (1)
263throw new Win32Exception(Marshal.GetLastPInvokeError());
System.Private.Windows.Core (1)
Windows\Win32\PInvokeCore.GetWindowText.cs (1)
33Debug.Fail($"GetWindowTextLength failed. Error: {new Win32Exception(error).Message}");
System.Windows.Forms (2)
System\Windows\Forms\Control.cs (1)
5708: throw new Win32Exception((int)WIN32_ERROR.ERROR_INVALID_HANDLE);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
3055throw new Win32Exception(expectedLength);
System.Windows.Forms.Primitives (1)
Windows\Win32\PInvoke.SHCreateItemFromParsingName.cs (1)
16throw new Win32Exception((int)hr);
System.Windows.Forms.Primitives.Tests (1)
Interop\Mocks\MockCursor.cs (1)
22throw new Win32Exception(Marshal.GetLastWin32Error());
System.Windows.Forms.Primitives.TestUtilities (1)
Win32\WindowClass.cs (1)
200throw new Win32Exception(Marshal.GetLastWin32Error());
UIAutomationClient (1)
MS\Internal\Automation\Misc.cs (1)
255throw new Win32Exception(errorCode);
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\Input.cs (2)
123throw new Win32Exception(Marshal.GetLastWin32Error()); 148throw new Win32Exception(Marshal.GetLastWin32Error());
MS\Internal\AutomationProxies\Misc.cs (1)
1706throw new Win32Exception(errorCode);
UIAutomationTypes (4)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (4)
404throw new Win32Exception(win32Err); 486throw new Win32Exception(win32Err); 500throw new Win32Exception(win32Err); 626throw new Win32Exception(errorCode);
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
975throw new Win32Exception(Marshal.GetLastWin32Error());