11 types derived from Win32Exception
Microsoft.AspNetCore.Server.HttpSys (1)
HttpSysException.cs (1)
14public class HttpSysException : Win32Exception
Microsoft.Build (1)
NativeWin32Exception.cs (1)
25internal sealed class NativeWin32Exception : Win32Exception
Microsoft.Build.Engine.OM.UnitTests (1)
NativeWin32Exception.cs (1)
25internal sealed class NativeWin32Exception : Win32Exception
Microsoft.Build.Tasks.Core (1)
NativeWin32Exception.cs (1)
25internal sealed class NativeWin32Exception : Win32Exception
Microsoft.Build.Utilities.Core (1)
NativeWin32Exception.cs (1)
25internal sealed class NativeWin32Exception : Win32Exception
MSBuild (1)
NativeWin32Exception.cs (1)
25internal sealed class NativeWin32Exception : Win32Exception
System.Net.HttpListener (1)
System\Net\HttpListenerException.cs (1)
12public class HttpListenerException : Win32Exception
System.Net.NetworkInformation (1)
src\libraries\Common\src\System\Net\NetworkInformation\NetworkInformationException.cs (1)
18public class NetworkInformationException : Win32Exception
System.Net.Primitives (2)
System\Net\SocketException.cs (1)
12public partial class SocketException : Win32Exception
System\Net\SocketException.Unix.cs (1)
8public partial class SocketException : Win32Exception
System.Net.WebSockets (1)
System\Net\WebSockets\WebSocketException.cs (1)
13public sealed class WebSocketException : Win32Exception
202 instantiations of Win32Exception
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\DisconnectListener.cs (1)
103Log.UnknownDisconnectError(_logger, new Win32Exception((int)statusCode));
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
ProcessTracker.cs (2)
43throw new Win32Exception(); 61throw new Win32Exception();
Microsoft.Build (2)
BackEnd\Components\Communications\NodeLauncher.cs (1)
165System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception();
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 (2)
LockCheck.cs (1)
393throw new Win32Exception(res, $"{message} ({apiName}() error {res}: {reason})");
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.Features (1)
SymbolSearch\Windows\NativePatching.cs (1)
73throw new Win32Exception();
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\BrokeredServiceBase.cs (1)
206throw new Win32Exception();
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.RemoteExecutor (1)
MiniDump.cs (1)
33throw new Win32Exception();
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 (17)
MS\Internal\AppModel\CookieHandler.cs (2)
120throw new Win32Exception(/*uses last error code*/); 137throw new Win32Exception(/*uses last error code*/);
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (1)
57throw new Win32Exception();
MS\Internal\FontCache\FontCacheUtil.cs (1)
357throw new Win32Exception();
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
478throw new Win32Exception(Marshal.GetLastWin32Error());
MS\Internal\Text\TextInterface\DWriteLoader.cs (1)
21throw new DllNotFoundException("dwrite.dll", new Win32Exception());
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
55throw new System.ComponentModel.Win32Exception(win32Err);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
85throw new Win32Exception( hr ) ;
System\Windows\Input\Cursor.cs (2)
189throw new Win32Exception(errorCode, SR.Format(SR.Cursor_LoadImageFailure, fileName)); 193throw new Win32Exception(errorCode);
System\Windows\Input\TextCompositionManager.cs (1)
411throw new Win32Exception(); // Initializes with Marshal.GetLastPInvokeError()
System\Windows\InterOp\D3DImage.cs (1)
701throw new Win32Exception();
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
234throw new System.ComponentModel.Win32Exception();
System\Windows\Media\Imaging\BitmapDownload.cs (1)
136throw new Win32Exception();
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
1303throw new Win32Exception();
System\Windows\Ole\WpfOleServices.cs (1)
53throw new Win32Exception();
System\Windows\UIElement.cs (1)
1142throw new Win32Exception();
PresentationFramework (59)
MS\Internal\AppModel\AppSecurityManager.cs (1)
137new System.ComponentModel.Win32Exception(/*uses the last Win32 error*/));
System\Windows\Controls\Primitives\Popup.cs (1)
3226throw new Win32Exception();
System\windows\Documents\CaretElement.cs (2)
1003throw new System.ComponentModel.Win32Exception(win32Error); 1094throw new System.ComponentModel.Win32Exception(win32Error);
System\Windows\Documents\TextFindEngine.cs (1)
582throw new System.ComponentModel.Win32Exception(win32Error);
System\Windows\Standard\ErrorCodes.cs (1)
462return new Win32Exception(code, message);
System\Windows\Standard\NativeMethods.cs (12)
2355throw new Win32Exception(); 2410throw new Win32Exception(); 2423throw new Win32Exception(); 2436throw new Win32Exception(); 2599throw new Win32Exception(); 2611throw new Win32Exception(); 2726throw new Win32Exception(); 2764throw new Win32Exception(); 2802throw new Win32Exception(); 2858throw new Win32Exception(); 2934throw new Win32Exception(); 2956throw new Win32Exception();
System\Windows\SystemParameters.cs (40)
115throw new Win32Exception(); 146throw new Win32Exception(); 179throw new Win32Exception(); 208throw new Win32Exception(); 298throw new Win32Exception(); 327throw new Win32Exception(); 356throw new Win32Exception(); 463throw new Win32Exception(); 581throw new Win32Exception(); 609throw new Win32Exception(); 637throw new Win32Exception(); 665throw new Win32Exception(); 693throw new Win32Exception(); 721throw new Win32Exception(); 757throw new Win32Exception(); 788throw new Win32Exception(); 820throw new Win32Exception(); 1001throw new Win32Exception(); 1028throw new Win32Exception(); 1057throw new Win32Exception(); 1160throw new Win32Exception(); 1191throw new Win32Exception(); 1224throw new Win32Exception(); 1252throw new Win32Exception(); 1280throw new Win32Exception(); 1308throw new Win32Exception(); 1359throw new Win32Exception(); 1387throw new Win32Exception(); 1415throw new Win32Exception(); 1460throw new Win32Exception(); 1488throw new Win32Exception(); 1516throw new Win32Exception(); 1795throw new Win32Exception(); 1823throw new Win32Exception(); 1873throw new Win32Exception(); 1903throw new Win32Exception(); 1932throw new Win32Exception(); 1961throw new Win32Exception(); 4970throw new Win32Exception(); 5764throw new Win32Exception();
System\Windows\Window.cs (1)
3890throw new Win32Exception();
ReachFramework (3)
PrintConfig\FallbackPTProvider.cs (3)
514throw new Win32Exception(); 586throw new Win32Exception(); 602throw new Win32Exception();
System.Console (1)
System\ConsolePal.Unix.cs (1)
886throw new Win32Exception();
System.Diagnostics.Process (16)
System\Diagnostics\Process.cs (1)
1747return new Win32Exception(errorCode, msg);
System\Diagnostics\Process.Linux.cs (3)
193throw new Win32Exception(); // match Windows exception 204throw new Win32Exception(); // match Windows exception 372throw new Win32Exception(SR.ProcessInformationUnavailable);
System\Diagnostics\Process.Unix.cs (12)
87throw new Win32Exception(); // same exception as on Windows 119(exceptions ??= new List<Exception>()).Add(new Win32Exception()); 133(exceptions ??= new List<Exception>()).Add(new Win32Exception()); 269throw new Win32Exception(errno); // match Windows exception 301throw new Win32Exception(); // match Windows exception 414throw new Win32Exception(Interop.Errors.ERROR_NO_ASSOCIATION); 453throw new Win32Exception(SR.DirectoryNotValidAsInput); 833throw new Win32Exception(); 976throw new Win32Exception(SR.Format(SR.UserDoesNotExist, startInfo.UserName)); 982throw new Win32Exception(SR.Format(SR.UserGroupsCannotBeDetermined, startInfo.UserName)); 1058throw new Win32Exception(errorInfo.RawErrno, errorInfo.GetErrorMessage()); 1084throw new Win32Exception();
System.IO.Ports (1)
System\IO\Ports\InternalResources.cs (1)
19return new Win32Exception(errorCode).Message;
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (1)
198throw new Win32Exception(result.Info().RawErrno);
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.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (1)
263throw new Win32Exception(Marshal.GetLastPInvokeError());
System.Private.Windows.Core (8)
System\Private\Windows\Ole\DataFormatsCore.cs (1)
40throw new Win32Exception(SR.RegisterCFFailed);
System\Private\Windows\Ole\DragDropHelper.cs (4)
208throw new Win32Exception(Marshal.GetLastSystemError(), SR.ExternalException); 215throw new Win32Exception(Marshal.GetLastSystemError(), SR.ExternalException); 366throw new Win32Exception(Marshal.GetLastSystemError(), SR.ExternalException); 373throw new Win32Exception(Marshal.GetLastSystemError(), SR.ExternalException);
Windows\Win32\Graphics\Gdi\CreateBrushScope.cs (1)
65throw new Win32Exception("Could not create a GDI brush.");
Windows\Win32\PInvokeCore.GetWindowText.cs (2)
33Debug.Fail($"GetWindowTextLength failed. Error: {new Win32Exception(error).Message}"); 52Debug.Fail($"GetWindowText failed. Error: {new Win32Exception().Message}");
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (1)
357throw new Win32Exception();
System.Windows.Forms (30)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
857throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed);
System\Windows\Forms\Control.cs (6)
1299throw new Win32Exception(lastWin32Error, string.Format(SR.LoadDLLError, Libraries.Comctl32)); 5708: throw new Win32Exception((int)WIN32_ERROR.ERROR_INVALID_HANDLE); 6995throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 9267throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 10204throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 10220throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
591return height == -1 ? throw new Win32Exception() : height; 1968return h == -1 ? throw new Win32Exception() : h;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
1428throw new Win32Exception(); 1483throw new Win32Exception();
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
268throw new Win32Exception(lastWin32Error, string.Format(SR.LoadDLLError, Libraries.RichEdit41)); 3055throw new Win32Exception(expectedLength);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
1799throw new Win32Exception();
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
237throw new Win32Exception();
System\Windows\Forms\Dialogs\MessageBox.cs (1)
470throw new Win32Exception(lastWin32Error, string.Format(SR.LoadDLLError, Libraries.Shell32));
System\Windows\Forms\Form.cs (1)
6056throw new Win32Exception();
System\Windows\Forms\Input\Cursor.cs (2)
41throw new Win32Exception(string.Format(SR.FailedToLoadCursor, Marshal.GetLastWin32Error())); 430throw new Win32Exception(string.Format(SR.FailedToLoadCursor, Marshal.GetLastWin32Error()));
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
710throw new Win32Exception();
System\Windows\Forms\NativeWindow.cs (2)
179throw new Win32Exception(); 472throw new Win32Exception(lastWin32Error, SR.ErrorCreatingHandle);
System\Windows\Forms\NativeWindow.WindowClass.cs (2)
147throw new Win32Exception(Marshal.GetLastWin32Error(), SR.InvalidWndClsName); 168throw new Win32Exception();
System\Windows\Forms\Rendering\ControlPaint.cs (2)
204throw new Win32Exception(); 216throw new Win32Exception();
System\Windows\Forms\SendKeys\SendKeys.cs (1)
742throw new Win32Exception();
System\Windows\Forms\WindowSubclassHandler.cs (3)
104throw new Win32Exception(); 189throw new Win32Exception(); 208throw new Win32Exception();
System.Windows.Forms.Interop.Tests (3)
PropertyGridTests.cs (3)
93throw new Win32Exception(); 101throw new Win32Exception(); 113throw new Win32Exception();
System.Windows.Forms.Primitives (5)
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (4)
49throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32GetThreadsDpiContextFailed); 64throw new Win32Exception(Marshal.GetLastWin32Error(), string.Format(SR.Win32SetThreadsDpiHostingBehaviorFailed, behavior)); 79throw new Win32Exception(Marshal.GetLastWin32Error(), string.Format(SR.Win32SetThreadsDpiHostingBehaviorFailed, _originalDpiHostingBehavior)); 85throw new Win32Exception(Marshal.GetLastWin32Error(), string.Format(SR.Win32SetThreadsDpiContextFailed, _originalDpiAwarenessContext));
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 (4)
Metafiles\EmfScope.cs (1)
50throw new Win32Exception("Could not create metafile");
Win32\WindowClass.cs (2)
118throw new Win32Exception(); 200throw new Win32Exception(Marshal.GetLastWin32Error());
Windows\Win32\System\Com\ComClassFactory.cs (1)
30throw new Win32Exception();
System.Windows.Forms.Tests (1)
System\Windows\Forms\RichTextBoxTests.cs (1)
11071throw new Win32Exception(lastWin32Error, $"Failed to load '{NativeDll}'");
System.Windows.Forms.UI.IntegrationTests (1)
ImageListTests.cs (1)
82throw new Win32Exception(lastWin32Error, "Failed to retrieves the count of GDI handles");
UIAutomationClient (2)
MS\Internal\Automation\Misc.cs (1)
254throw new Win32Exception(errorCode);
MS\Internal\Automation\WinEventWrap.cs (1)
113throw new Win32Exception();
UIAutomationClientSideProviders (4)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
1482throw new Win32Exception();
MS\Internal\AutomationProxies\Input.cs (2)
120throw new Win32Exception(Marshal.GetLastWin32Error()); 145throw new Win32Exception(Marshal.GetLastWin32Error());
MS\Internal\AutomationProxies\Misc.cs (1)
1705throw new Win32Exception(errorCode);
UIAutomationTypes (13)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (13)
101throw new Win32Exception(); 288throw new Win32Exception(win32Err); 317throw new Win32Exception(); 365throw new Win32Exception(win32Err); 379throw new Win32Exception(win32Err); 451throw new Win32Exception(); 483throw new Win32Exception(errorCode); 506throw new Win32Exception(); 525throw new Win32Exception(); 775throw new Win32Exception(); 842throw new Win32Exception(); 1055throw new Win32Exception(); 1067throw new Win32Exception();
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
974throw new Win32Exception(Marshal.GetLastWin32Error());
108 references to Win32Exception
InteropTests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Microsoft.AspNetCore.Server.HttpSys (2)
NativeInterop\DisconnectListener.cs (2)
30catch (Win32Exception exception) 91catch (Win32Exception exception)
Microsoft.AspNetCore.Server.IntegrationTesting (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Microsoft.Build (4)
BackEnd\BuildManager\BuildManager.cs (1)
452catch (Win32Exception) { }
BackEnd\Components\Communications\NodeLauncher.cs (1)
165System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception();
NativeWin32Exception.cs (2)
14/// A possibly-recoverable exception wrapping a failed native call. The <see cref="Win32Exception.NativeErrorCode" /> captures the 19/// This is much like <see cref="Win32Exception"/>, but the message field contains the caller-provided part in addition
Microsoft.Build.Framework (1)
NativeMethods.cs (1)
1343catch (Win32Exception e) when (e.NativeErrorCode == ERROR_ACCESS_DENIED)
Microsoft.Build.Tasks.Core (3)
NativeWin32Exception.cs (2)
14/// A possibly-recoverable exception wrapping a failed native call. The <see cref="Win32Exception.NativeErrorCode" /> captures the 19/// This is much like <see cref="Win32Exception"/>, but the message field contains the caller-provided part in addition
SignFile.cs (1)
87catch (Win32Exception ex)
Microsoft.Build.Utilities.Core (3)
NativeWin32Exception.cs (2)
14/// A possibly-recoverable exception wrapping a failed native call. The <see cref="Win32Exception.NativeErrorCode" /> captures the 19/// This is much like <see cref="Win32Exception"/>, but the message field contains the caller-provided part in addition
ToolTask.cs (1)
1605catch (Exception e) when (e is Win32Exception || e is IOException || e is UnauthorizedAccessException)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
7838Assert.Throws<Win32Exception>(() => Win32Res.GetResource(lib, resourceId, resourceType, out manifestSize));
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\ProcessExtensions.cs (1)
27catch (Exception e) when (e is PlatformNotSupportedException or Win32Exception)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
6862Assert.Throws(Of Win32Exception)(Function() Win32Res.GetResource(library, resourceId, resourceType, manifestSize))
Microsoft.DotNet.Open.Api.Tools.Tests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Microsoft.Extensions.ApiDescription.Client.Tests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
397ByVal ResourceID As String, ByVal ParamArray PlaceHolders() As String) As ComponentModel.Win32Exception
Microsoft.Win32.Primitives (1)
artifacts\obj\Microsoft.Win32.Primitives\Debug\net10.0\Microsoft.Win32.Primitives.Forwards.cs (1)
3[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Win32Exception))]
MSBuild (1)
XMake.cs (1)
2585catch (Win32Exception) { }
MSBuildTaskHost (1)
NativeMethods.cs (1)
1343catch (Win32Exception e) when (e.NativeErrorCode == ERROR_ACCESS_DENIED)
netstandard (1)
netstandard.cs (1)
428[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Win32Exception))]
PresentationCore (36)
MS\Internal\Automation\ElementUtil.cs (1)
137catch (System.ComponentModel.Win32Exception)
System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
49catch(Win32Exception) {} 73catch(Win32Exception) {}
System\Windows\Input\MouseDevice.cs (2)
124catch (System.ComponentModel.Win32Exception) 151catch (System.ComponentModel.Win32Exception)
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (1)
246catch(System.ComponentModel.Win32Exception e)
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceCollection.cs (1)
144catch (Win32Exception)
System\Windows\InterOp\HwndKeyboardInputProvider.cs (8)
142catch(System.ComponentModel.Win32Exception) 169catch(System.ComponentModel.Win32Exception) 200catch(System.ComponentModel.Win32Exception) 558catch(System.ComponentModel.Win32Exception) 592catch(System.ComponentModel.Win32Exception) 645catch(System.ComponentModel.Win32Exception) 820catch(System.ComponentModel.Win32Exception) 835catch(System.ComponentModel.Win32Exception)
System\Windows\InterOp\HwndMouseInputProvider.cs (20)
47catch(System.ComponentModel.Win32Exception) 58catch(System.ComponentModel.Win32Exception) 101catch(System.ComponentModel.Win32Exception) 130catch(System.ComponentModel.Win32Exception) 155catch(System.ComponentModel.Win32Exception) 192catch(System.ComponentModel.Win32Exception) 303catch(System.ComponentModel.Win32Exception) 344catch(System.ComponentModel.Win32Exception) 478catch(System.ComponentModel.Win32Exception) 675catch(System.ComponentModel.Win32Exception) 780catch(System.ComponentModel.Win32Exception) 916catch(System.ComponentModel.Win32Exception) 929catch(System.ComponentModel.Win32Exception) 959catch(System.ComponentModel.Win32Exception) 1140catch(System.ComponentModel.Win32Exception) 1158catch(System.ComponentModel.Win32Exception) 1298catch(System.ComponentModel.Win32Exception) 1310catch(System.ComponentModel.Win32Exception) 1394catch(System.ComponentModel.Win32Exception) 1409catch(System.ComponentModel.Win32Exception)
System\Windows\InterOp\HwndTarget.cs (1)
495catch (Win32Exception)
PresentationFramework (4)
System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
41catch (Win32Exception) 74catch(Win32Exception) {}
System\Windows\Controls\Primitives\Popup.cs (2)
2767catch(Win32Exception) 3575catch(Win32Exception)
ReachFramework (1)
PrintConfig\FallbackPTProvider.cs (1)
71catch (Win32Exception win32Exception)
System (1)
src\libraries\shims\System\ref\System.cs (1)
414[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Win32Exception))]
System.Diagnostics.Process (2)
System\Diagnostics\Process.cs (1)
1743private static Win32Exception CreateExceptionForErrorStartingProcess(string errorMessage, int errorCode, string fileName, string? workingDirectory)
System\Diagnostics\Process.NonUap.cs (1)
106e is InvalidOperationException || e is Win32Exception;
System.Drawing.Common.Tests (4)
System\Drawing\IconTests.cs (4)
179PlatformDetection.IsNetFramework ? typeof(Win32Exception) : typeof(ArgumentException) 183yield return new object[] { new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0 }, typeof(Win32Exception) }; 197PlatformDetection.IsNetFramework ? typeof(Win32Exception) : typeof(ArgumentException) 204yield return new object[] { new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(Win32Exception) };
System.Net.Security (3)
System\Net\Security\NegotiateAuthentication.cs (1)
158/// <exception cref="Win32Exception">System error occurred when trying to retrieve the identity.</exception>
System\Net\Security\NegotiateStream.cs (2)
830Win32Exception win32Exception = new Win32Exception(errorCode); 932var e = new Win32Exception((int)error);
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (3)
23/// Initializes a new instance of the <see cref='Win32Exception'/> class with the last Win32 error 31/// Initializes a new instance of the <see cref='Win32Exception'/> class with the specified error. 37/// Initializes a new instance of the <see cref='Win32Exception'/> class with the specified error and the
System.Windows.Forms (4)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
1602catch (Exception ex) when (ex is InvalidOperationException or Win32Exception)
System\Windows\Forms\WindowSubclassHandler.cs (3)
83/// <exception cref="Win32Exception">The window could not be subclassed.</exception> 127/// <exception cref="Win32Exception">The subclassing could not be undone.</exception> 167/// <exception cref="Win32Exception">The subclassing could not be undone.</exception>
System.Windows.Forms.Tests (7)
System\Windows\Forms\CommonDialogTests.cs (1)
226Assert.Throws<Win32Exception>(() => dialog.ShowDialog(owner.Object));
System\Windows\Forms\ControlTests.Methods.cs (2)
598Assert.Throws<Win32Exception>(control.CreateControl); 758Assert.Throws<Win32Exception>(control.CreateHandle);
System\Windows\Forms\DataFormatsTests.cs (1)
123Assert.Throws<Win32Exception>(() => DataFormats.GetFormat(format));
System\Windows\Forms\ListBoxTests.cs (1)
5286Assert.Throws<Win32Exception>(() => control.GetItemHeight(0));
System\Windows\Forms\NativeWindowTests.cs (2)
194Assert.Throws<Win32Exception>(() => window.CreateHandle(cp)); 216Assert.Throws<Win32Exception>(() => window2.CreateHandle(cp2));
Templates.Blazor.Tests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Templates.Blazor.WebAssembly.Tests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Templates.Mvc.Tests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Templates.Tests (2)
src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
1501catch (Win32Exception)
MS\Internal\AutomationProxies\WindowsToolbar.cs (1)
85catch(Win32Exception)
MS\Internal\AutomationProxies\WinFormsSpinner.cs (1)
43catch (Win32Exception)
WinFormsControlsTest (1)
TaskDialogSamples.cs (1)
447catch (Win32Exception ex) when (ex.NativeErrorCode == 1223)