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
216 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)
394throw 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)
75throw new Win32Exception();
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\BrokeredServiceBase.cs (1)
207throw 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.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 (27)
MS\Internal\AppModel\CookieHandler.cs (2)
121throw new Win32Exception(/*uses last error code*/); 138throw new Win32Exception(/*uses last error code*/);
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (1)
58throw new Win32Exception();
MS\Internal\FontCache\FontCacheUtil.cs (1)
358throw new Win32Exception();
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
479throw 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)
56throw new System.ComponentModel.Win32Exception(win32Err);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
86throw new Win32Exception( hr ) ;
System\Windows\DataFormats.cs (1)
101throw new System.ComponentModel.Win32Exception();
System\Windows\dataobject.cs (10)
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); 1072throw new System.ComponentModel.Win32Exception(); 1138throw new System.ComponentModel.Win32Exception(); 1151throw new System.ComponentModel.Win32Exception(win32Error); 1386throw new System.ComponentModel.Win32Exception(win32Error);
System\Windows\Input\Cursor.cs (2)
192throw new Win32Exception(errorCode, SR.Format(SR.Cursor_LoadImageFailure, fileName)); 196throw new Win32Exception(errorCode);
System\Windows\Input\TextCompositionManager.cs (1)
397throw new System.ComponentModel.Win32Exception(win32Err);
System\Windows\InterOp\D3DImage.cs (1)
702throw new Win32Exception();
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
235throw new System.ComponentModel.Win32Exception();
System\Windows\Media\Imaging\BitmapDownload.cs (1)
138throw new Win32Exception();
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
1311throw new Win32Exception();
System\Windows\UIElement.cs (1)
1143throw new Win32Exception();
PresentationFramework (59)
MS\Internal\AppModel\AppSecurityManager.cs (1)
138new System.ComponentModel.Win32Exception(/*uses the last Win32 error*/));
System\Windows\Controls\Primitives\Popup.cs (1)
3227throw new Win32Exception();
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\Windows\Standard\ErrorCodes.cs (1)
463return new Win32Exception(code, message);
System\Windows\Standard\NativeMethods.cs (12)
2364throw new Win32Exception(); 2419throw new Win32Exception(); 2432throw new Win32Exception(); 2445throw new Win32Exception(); 2608throw new Win32Exception(); 2620throw new Win32Exception(); 2735throw new Win32Exception(); 2773throw new Win32Exception(); 2811throw new Win32Exception(); 2867throw new Win32Exception(); 2943throw new Win32Exception(); 2965throw new Win32Exception();
System\Windows\SystemParameters.cs (40)
116throw new Win32Exception(); 147throw new Win32Exception(); 180throw new Win32Exception(); 209throw new Win32Exception(); 299throw new Win32Exception(); 328throw new Win32Exception(); 357throw new Win32Exception(); 464throw new Win32Exception(); 582throw new Win32Exception(); 610throw new Win32Exception(); 638throw new Win32Exception(); 666throw new Win32Exception(); 694throw new Win32Exception(); 722throw new Win32Exception(); 758throw new Win32Exception(); 789throw new Win32Exception(); 821throw new Win32Exception(); 1002throw new Win32Exception(); 1029throw new Win32Exception(); 1058throw new Win32Exception(); 1161throw new Win32Exception(); 1192throw new Win32Exception(); 1225throw new Win32Exception(); 1253throw new Win32Exception(); 1281throw new Win32Exception(); 1309throw new Win32Exception(); 1360throw new Win32Exception(); 1388throw new Win32Exception(); 1416throw new Win32Exception(); 1461throw new Win32Exception(); 1489throw new Win32Exception(); 1517throw new Win32Exception(); 1796throw new Win32Exception(); 1824throw new Win32Exception(); 1874throw new Win32Exception(); 1904throw new Win32Exception(); 1933throw new Win32Exception(); 1962throw new Win32Exception(); 4971throw new Win32Exception(); 5765throw new Win32Exception();
System\Windows\Window.cs (1)
3891throw new Win32Exception();
ReachFramework (3)
PrintConfig\FallbackPTProvider.cs (3)
515throw new Win32Exception(); 587throw new Win32Exception(); 603throw 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)
358throw new Win32Exception();
System.Windows.Forms (30)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
858throw 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); 6998throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 9273throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 10213throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 10229throw 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)
1802throw 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)
6062throw 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)
716throw 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)
207throw new Win32Exception(); 219throw 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)
11069throw 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)
255throw new Win32Exception(errorCode);
MS\Internal\Automation\WinEventWrap.cs (1)
114throw new Win32Exception();
UIAutomationClientSideProviders (4)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
1483throw new Win32Exception();
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 (13)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (13)
117throw new Win32Exception(); 404throw new Win32Exception(win32Err); 433throw new Win32Exception(); 486throw new Win32Exception(win32Err); 500throw new Win32Exception(win32Err); 594throw new Win32Exception(); 626throw new Win32Exception(errorCode); 662throw new Win32Exception(); 684throw new Win32Exception(); 934throw new Win32Exception(); 999throw new Win32Exception(); 1252throw new Win32Exception(); 1264throw new Win32Exception();
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
975throw 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)
446catch (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)
1344catch (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)
2566catch (Win32Exception) { }
MSBuildTaskHost (1)
NativeMethods.cs (1)
1344catch (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)
138catch (System.ComponentModel.Win32Exception)
System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
50catch(Win32Exception) {} 74catch(Win32Exception) {}
System\Windows\Input\MouseDevice.cs (2)
125catch (System.ComponentModel.Win32Exception) 152catch (System.ComponentModel.Win32Exception)
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (1)
247catch(System.ComponentModel.Win32Exception e)
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceCollection.cs (1)
145catch (Win32Exception)
System\Windows\InterOp\HwndKeyboardInputProvider.cs (8)
143catch(System.ComponentModel.Win32Exception) 170catch(System.ComponentModel.Win32Exception) 201catch(System.ComponentModel.Win32Exception) 559catch(System.ComponentModel.Win32Exception) 593catch(System.ComponentModel.Win32Exception) 646catch(System.ComponentModel.Win32Exception) 821catch(System.ComponentModel.Win32Exception) 836catch(System.ComponentModel.Win32Exception)
System\Windows\InterOp\HwndMouseInputProvider.cs (20)
48catch(System.ComponentModel.Win32Exception) 59catch(System.ComponentModel.Win32Exception) 102catch(System.ComponentModel.Win32Exception) 131catch(System.ComponentModel.Win32Exception) 156catch(System.ComponentModel.Win32Exception) 193catch(System.ComponentModel.Win32Exception) 304catch(System.ComponentModel.Win32Exception) 345catch(System.ComponentModel.Win32Exception) 479catch(System.ComponentModel.Win32Exception) 676catch(System.ComponentModel.Win32Exception) 781catch(System.ComponentModel.Win32Exception) 917catch(System.ComponentModel.Win32Exception) 930catch(System.ComponentModel.Win32Exception) 960catch(System.ComponentModel.Win32Exception) 1141catch(System.ComponentModel.Win32Exception) 1159catch(System.ComponentModel.Win32Exception) 1299catch(System.ComponentModel.Win32Exception) 1311catch(System.ComponentModel.Win32Exception) 1395catch(System.ComponentModel.Win32Exception) 1410catch(System.ComponentModel.Win32Exception)
System\Windows\InterOp\HwndTarget.cs (1)
496catch (Win32Exception)
PresentationFramework (4)
System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
42catch (Win32Exception) 75catch(Win32Exception) {}
System\Windows\Controls\Primitives\Popup.cs (2)
2768catch(Win32Exception) 3576catch(Win32Exception)
ReachFramework (1)
PrintConfig\FallbackPTProvider.cs (1)
72catch (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)
224Assert.Throws<Win32Exception>(() => dialog.ShowDialog(owner.Object));
System\Windows\Forms\ControlTests.Methods.cs (2)
596Assert.Throws<Win32Exception>(control.CreateControl); 756Assert.Throws<Win32Exception>(control.CreateHandle);
System\Windows\Forms\DataFormatsTests.cs (1)
121Assert.Throws<Win32Exception>(() => DataFormats.GetFormat(format));
System\Windows\Forms\ListBoxTests.cs (1)
5284Assert.Throws<Win32Exception>(() => control.GetItemHeight(0));
System\Windows\Forms\NativeWindowTests.cs (2)
192Assert.Throws<Win32Exception>(() => window.CreateHandle(cp)); 214Assert.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)
1502catch (Win32Exception)
MS\Internal\AutomationProxies\WindowsToolbar.cs (1)
86catch(Win32Exception)
MS\Internal\AutomationProxies\WinFormsSpinner.cs (1)
44catch (Win32Exception)
WinFormsControlsTest (1)
TaskDialogSamples.cs (1)
447catch (Win32Exception ex) when (ex.NativeErrorCode == 1223)