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
152 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 (2)
LocalProvider\SharedMemory.cs (1)
171throw new System.ComponentModel.Win32Exception();
Shared\FileUtilities.cs (1)
772throw new System.ComponentModel.Win32Exception();
Microsoft.Build.Engine.OM.UnitTests (1)
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
Microsoft.Build.Tasks.Core (2)
LockCheck.cs (1)
381throw new Win32Exception(res, $"{message} ({apiName}() error {res}: {reason})");
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
Microsoft.Build.Utilities.Core (1)
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
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;
MSBuild (1)
NativeWin32Exception.cs (1)
55string systemMessage = new Win32Exception(nativeErrorCode).Message;
PresentationCore (27)
MS\Internal\AppModel\CookieHandler.cs (2)
128throw new Win32Exception(/*uses last error code*/); 146throw new Win32Exception(/*uses last error code*/);
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (1)
60throw new Win32Exception();
MS\Internal\FontCache\FontCacheUtil.cs (1)
380throw new Win32Exception();
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
484throw new Win32Exception(Marshal.GetLastWin32Error());
MS\Internal\Text\TextInterface\DWriteLoader.cs (1)
22throw new DllNotFoundException("dwrite.dll", new Win32Exception());
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
60throw new System.ComponentModel.Win32Exception(win32Err);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
92throw new Win32Exception( hr ) ;
System\Windows\DataFormats.cs (1)
105throw new System.ComponentModel.Win32Exception();
System\Windows\dataobject.cs (10)
986throw new System.ComponentModel.Win32Exception(win32Error); 1015throw new System.ComponentModel.Win32Exception(win32Error); 1028throw new System.ComponentModel.Win32Exception(win32Error); 1043throw new System.ComponentModel.Win32Exception(win32Error); 1058throw new System.ComponentModel.Win32Exception(win32Error); 1072throw new System.ComponentModel.Win32Exception(win32Error); 1086throw new System.ComponentModel.Win32Exception(); 1152throw new System.ComponentModel.Win32Exception(); 1165throw new System.ComponentModel.Win32Exception(win32Error); 1406throw new System.ComponentModel.Win32Exception(win32Error);
System\Windows\Input\Cursor.cs (2)
201throw new Win32Exception(errorCode, SR.Format(SR.Cursor_LoadImageFailure, fileName)); 205throw new Win32Exception(errorCode);
System\Windows\Input\TextCompositionManager.cs (1)
407throw new System.ComponentModel.Win32Exception(win32Err);
System\Windows\InterOp\D3DImage.cs (1)
714throw new Win32Exception();
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
244throw new System.ComponentModel.Win32Exception();
System\Windows\Media\Imaging\BitmapDownload.cs (1)
156throw new Win32Exception();
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
1336throw new Win32Exception();
System\Windows\UIElement.cs (1)
1154throw new Win32Exception();
PresentationFramework (59)
MS\Internal\AppModel\AppSecurityManager.cs (1)
155new System.ComponentModel.Win32Exception(/*uses the last Win32 error*/));
System\Windows\Controls\Primitives\Popup.cs (1)
3234throw new Win32Exception();
System\windows\Documents\CaretElement.cs (2)
1010throw new System.ComponentModel.Win32Exception(win32Error); 1101throw new System.ComponentModel.Win32Exception(win32Error);
System\Windows\Documents\TextFindEngine.cs (1)
592throw new System.ComponentModel.Win32Exception(win32Error);
System\Windows\Standard\ErrorCodes.cs (1)
472return new Win32Exception(code, message);
System\Windows\Standard\NativeMethods.cs (12)
2400throw new Win32Exception(); 2460throw new Win32Exception(); 2475throw new Win32Exception(); 2490throw new Win32Exception(); 2680throw new Win32Exception(); 2694throw new Win32Exception(); 2819throw new Win32Exception(); 2860throw new Win32Exception(); 2901throw new Win32Exception(); 2970throw new Win32Exception(); 3060throw new Win32Exception(); 3085throw new Win32Exception();
System\Windows\SystemParameters.cs (40)
130throw new Win32Exception(); 161throw new Win32Exception(); 193throw new Win32Exception(); 222throw new Win32Exception(); 312throw new Win32Exception(); 341throw new Win32Exception(); 370throw new Win32Exception(); 477throw new Win32Exception(); 595throw new Win32Exception(); 623throw new Win32Exception(); 651throw new Win32Exception(); 679throw new Win32Exception(); 707throw new Win32Exception(); 735throw new Win32Exception(); 771throw new Win32Exception(); 802throw new Win32Exception(); 834throw new Win32Exception(); 1015throw new Win32Exception(); 1042throw new Win32Exception(); 1071throw new Win32Exception(); 1174throw new Win32Exception(); 1205throw new Win32Exception(); 1238throw new Win32Exception(); 1266throw new Win32Exception(); 1294throw new Win32Exception(); 1322throw new Win32Exception(); 1373throw new Win32Exception(); 1401throw new Win32Exception(); 1429throw new Win32Exception(); 1474throw new Win32Exception(); 1502throw new Win32Exception(); 1530throw new Win32Exception(); 1809throw new Win32Exception(); 1837throw new Win32Exception(); 1887throw new Win32Exception(); 1917throw new Win32Exception(); 1946throw new Win32Exception(); 1975throw new Win32Exception(); 4984throw new Win32Exception(); 5786throw new Win32Exception();
System\Windows\Window.cs (1)
3804throw new Win32Exception();
ReachFramework (3)
PrintConfig\FallbackPTProvider.cs (3)
522throw new Win32Exception(); 594throw new Win32Exception(); 610throw new Win32Exception();
System.Console (1)
System\ConsolePal.Unix.cs (1)
899throw new Win32Exception();
System.Diagnostics.Process (16)
System\Diagnostics\Process.cs (1)
1745return new Win32Exception(errorCode, msg);
System\Diagnostics\Process.Linux.cs (3)
189throw new Win32Exception(); // match Windows exception 200throw new Win32Exception(); // match Windows exception 367throw 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); 827throw new Win32Exception(); 970throw new Win32Exception(SR.Format(SR.UserDoesNotExist, startInfo.UserName)); 976throw new Win32Exception(SR.Format(SR.UserGroupsCannotBeDetermined, startInfo.UserName)); 1052throw new Win32Exception(errorInfo.RawErrno, errorInfo.GetErrorMessage()); 1078throw 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.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (1)
362throw new Win32Exception();
UIAutomationClient (2)
MS\Internal\Automation\Misc.cs (1)
264throw new Win32Exception(errorCode);
MS\Internal\Automation\WinEventWrap.cs (1)
120throw new Win32Exception();
UIAutomationClientSideProviders (4)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
1484throw new Win32Exception();
MS\Internal\AutomationProxies\Input.cs (2)
121throw new Win32Exception(Marshal.GetLastWin32Error()); 144throw new Win32Exception(Marshal.GetLastWin32Error());
MS\Internal\AutomationProxies\Misc.cs (1)
1726throw new Win32Exception(errorCode);
UIAutomationTypes (13)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (13)
123throw new Win32Exception(); 410throw new Win32Exception(win32Err); 439throw new Win32Exception(); 492throw new Win32Exception(win32Err); 506throw new Win32Exception(win32Err); 600throw new Win32Exception(); 632throw new Win32Exception(errorCode); 668throw new Win32Exception(); 690throw new Win32Exception(); 940throw new Win32Exception(); 1005throw new Win32Exception(); 1258throw new Win32Exception(); 1270throw new Win32Exception();
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
998throw new Win32Exception(Marshal.GetLastWin32Error());
91 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)
457catch (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.Engine (1)
LocalProvider\LocalNodeProvider.cs (1)
464catch (System.ComponentModel.Win32Exception)
Microsoft.Build.Framework (1)
NativeMethods.cs (1)
1216catch (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)
1603catch (Exception e) when (e is Win32Exception || e is IOException || e is UnauthorizedAccessException)
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\net9.0\Microsoft.Win32.Primitives.Forwards.cs (1)
3[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Win32Exception))]
MSBuild (1)
XMake.cs (1)
2526catch (Win32Exception) { }
MSBuildTaskHost (1)
NativeMethods.cs (1)
1216catch (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)
153catch (System.ComponentModel.Win32Exception)
System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
63catch(Win32Exception) {} 91catch(Win32Exception) {}
System\Windows\Input\MouseDevice.cs (2)
137catch (System.ComponentModel.Win32Exception) 164catch (System.ComponentModel.Win32Exception)
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (1)
257catch(System.ComponentModel.Win32Exception e)
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceCollection.cs (1)
150catch (Win32Exception)
System\Windows\InterOp\HwndKeyboardInputProvider.cs (8)
156catch(System.ComponentModel.Win32Exception) 183catch(System.ComponentModel.Win32Exception) 214catch(System.ComponentModel.Win32Exception) 572catch(System.ComponentModel.Win32Exception) 606catch(System.ComponentModel.Win32Exception) 659catch(System.ComponentModel.Win32Exception) 838catch(System.ComponentModel.Win32Exception) 853catch(System.ComponentModel.Win32Exception)
System\Windows\InterOp\HwndMouseInputProvider.cs (20)
55catch(System.ComponentModel.Win32Exception) 66catch(System.ComponentModel.Win32Exception) 111catch(System.ComponentModel.Win32Exception) 140catch(System.ComponentModel.Win32Exception) 165catch(System.ComponentModel.Win32Exception) 202catch(System.ComponentModel.Win32Exception) 316catch(System.ComponentModel.Win32Exception) 357catch(System.ComponentModel.Win32Exception) 491catch(System.ComponentModel.Win32Exception) 688catch(System.ComponentModel.Win32Exception) 793catch(System.ComponentModel.Win32Exception) 929catch(System.ComponentModel.Win32Exception) 942catch(System.ComponentModel.Win32Exception) 972catch(System.ComponentModel.Win32Exception) 1153catch(System.ComponentModel.Win32Exception) 1171catch(System.ComponentModel.Win32Exception) 1311catch(System.ComponentModel.Win32Exception) 1323catch(System.ComponentModel.Win32Exception) 1407catch(System.ComponentModel.Win32Exception) 1422catch(System.ComponentModel.Win32Exception)
System\Windows\InterOp\HwndTarget.cs (1)
511catch (Win32Exception)
PresentationFramework (4)
System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
53catch (Win32Exception) 88catch(Win32Exception) {}
System\Windows\Controls\Primitives\Popup.cs (2)
2764catch(Win32Exception) 3600catch(Win32Exception)
ReachFramework (1)
PrintConfig\FallbackPTProvider.cs (1)
76catch (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)
1741private static Win32Exception CreateExceptionForErrorStartingProcess(string errorMessage, int errorCode, string fileName, string? workingDirectory)
System\Diagnostics\Process.NonUap.cs (1)
106e is InvalidOperationException || e is 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.ServiceModel.Primitives (1)
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (1)
629return (e is ComponentModel.Win32Exception
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)
1503catch (Win32Exception)
MS\Internal\AutomationProxies\WindowsToolbar.cs (1)
89catch(Win32Exception)
MS\Internal\AutomationProxies\WinFormsSpinner.cs (1)
46catch (Win32Exception)