43 references to Win32Exception
aspire (5)
Processes\DetachedProcessLauncher.Windows.cs (5)
34throw new Win32Exception(Marshal.GetLastWin32Error(), "Failed to open NUL device"); 40throw new Win32Exception(Marshal.GetLastWin32Error(), "Failed to set NUL handle inheritance"); 52throw new Win32Exception(Marshal.GetLastWin32Error(), "Failed to initialize process thread attribute list"); 73throw new Win32Exception(Marshal.GetLastWin32Error(), "Failed to update process thread attribute list"); 103throw new Win32Exception(Marshal.GetLastWin32Error(), "Failed to create detached process");
Microsoft.AspNetCore.Server.HttpSys (1)
HttpSysException.cs (1)
27: base(errorCode, message)
Microsoft.Build.Framework (1)
FileSystem\NativeWin32Exception.cs (1)
33: base(nativeErrorCode, GetFormattedMessageForNativeErrorCode(nativeErrorCode, messagePrefix))
Microsoft.Private.Windows.Core (4)
System\Private\Windows\Ole\DragDropHelper.cs (4)
216throw new Win32Exception(Marshal.GetLastWin32Error(), SR.ExternalException); 223throw new Win32Exception(Marshal.GetLastWin32Error(), SR.ExternalException); 374throw new Win32Exception(Marshal.GetLastWin32Error(), SR.ExternalException); 381throw new Win32Exception(Marshal.GetLastWin32Error(), SR.ExternalException);
Microsoft.Win32.Msi (1)
WindowsInstallerException.cs (1)
28public WindowsInstallerException(int error, string? message) : base(error, message)
PresentationCore (1)
System\Windows\Input\Cursor.cs (1)
186throw new Win32Exception(errorCode, SR.Format(SR.Cursor_LoadImageFailure, fileName));
PresentationFramework (1)
System\Windows\Standard\ErrorCodes.cs (1)
462return new Win32Exception(code, message);
System.Diagnostics.PerformanceCounter (1)
System\Diagnostics\CounterSampleCalculator.cs (1)
101throw new Win32Exception(result, SR.Format(SR.PerfCounterPdhError, result.ToString("x", CultureInfo.InvariantCulture)));
System.Diagnostics.Process (2)
System\Diagnostics\ProcessUtils.cs (1)
47return new Win32Exception(errorCode, msg);
System\Diagnostics\ProcessUtils.Unix.cs (1)
143throw new Win32Exception(errorInfo.RawErrno, errorInfo.GetErrorMessage());
System.Management (1)
System\Management\ManagementScope.cs (1)
316throw new Win32Exception(Marshal.GetLastPInvokeError(), SR.Format(SR.LoadLibraryFailed, wminet_utilsPath));
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpException.cs (1)
15public WinHttpException(int error, string message) : base(error, message)
System.Net.HttpListener (1)
System\Net\HttpListenerException.cs (1)
24public HttpListenerException(int errorCode, string message) : base(errorCode, message)
System.Net.Primitives (1)
System\Net\SocketException.cs (1)
45internal SocketException(SocketError socketError, string? message) : base(GetNativeErrorForSocketError(socketError), message)
System.Net.WebSockets (1)
System\Net\WebSockets\WebSocketException.cs (1)
51: base(nativeError, message)
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (2)
33public Win32Exception(int error) : this(error, Marshal.GetPInvokeErrorMessage(error)) 48public Win32Exception(string? message) : this(Marshal.GetLastPInvokeError(), message)
System.Private.Windows.Core (4)
System\Private\Windows\Ole\DragDropHelper.cs (4)
216throw new Win32Exception(Marshal.GetLastWin32Error(), SR.ExternalException); 223throw new Win32Exception(Marshal.GetLastWin32Error(), SR.ExternalException); 374throw new Win32Exception(Marshal.GetLastWin32Error(), SR.ExternalException); 381throw new Win32Exception(Marshal.GetLastWin32Error(), SR.ExternalException);
System.Security.AccessControl (1)
System\Security\AccessControl\SecurityDescriptor.cs (1)
485throw new Win32Exception(error, SR.Format(SR.AccessControl_UnexpectedError, error));
System.Windows.Forms (10)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
857throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed);
System\Windows\Forms\Control.cs (5)
1567throw new Win32Exception(lastWin32Error, string.Format(SR.LoadDLLError, Libraries.Comctl32)); 7685throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 10087throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 11038throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed); 11054throw new Win32Exception(Marshal.GetLastWin32Error(), SR.Win32SetParentFailed);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
268throw new Win32Exception(lastWin32Error, string.Format(SR.LoadDLLError, Libraries.RichEdit41));
System\Windows\Forms\Dialogs\MessageBox.cs (1)
470throw new Win32Exception(lastWin32Error, string.Format(SR.LoadDLLError, Libraries.Shell32));
System\Windows\Forms\NativeWindow.cs (1)
472throw new Win32Exception(lastWin32Error, SR.ErrorCreatingHandle);
System\Windows\Forms\NativeWindow.WindowClass.cs (1)
147throw new Win32Exception(Marshal.GetLastWin32Error(), SR.InvalidWndClsName);
System.Windows.Forms.Primitives (4)
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));