5 types derived from Win32Exception
System (4)
net\System\Net\HttpListenerException.cs (1)
15public class HttpListenerException : Win32Exception
net\System\Net\NetworkInformation\NetworkInformationException.cs (1)
20public class NetworkInformationException : Win32Exception {
net\System\Net\SocketException.cs (1)
19public class SocketException : Win32Exception {
net\System\Net\WebSockets\WebSocketException.cs (1)
18public sealed class WebSocketException : Win32Exception
System.ServiceModel (1)
System\ServiceModel\Administration\WbemException.cs (1)
11internal class WbemException : Win32Exception
440 instantiations of Win32Exception
PresentationCore (24)
Core\CSharp\MS\Internal\AppModel\CookieHandler.cs (2)
144throw new Win32Exception(/*uses last error code*/); 175throw new Win32Exception(/*uses last error code*/);
Core\CSharp\MS\Internal\FontCache\FontCacheUtil.cs (1)
506throw new Win32Exception();
Core\CSharp\MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
568throw new Win32Exception(Marshal.GetLastWin32Error());
Core\CSharp\System\Windows\DataFormats.cs (1)
122throw new System.ComponentModel.Win32Exception();
Core\CSharp\System\Windows\DataObject.cs (10)
1177throw new System.ComponentModel.Win32Exception(win32Error); 1214throw new System.ComponentModel.Win32Exception(win32Error); 1231throw new System.ComponentModel.Win32Exception(win32Error); 1250throw new System.ComponentModel.Win32Exception(win32Error); 1269throw new System.ComponentModel.Win32Exception(win32Error); 1287throw new System.ComponentModel.Win32Exception(win32Error); 1305throw new System.ComponentModel.Win32Exception(); 1393throw new System.ComponentModel.Win32Exception(); 1410throw new System.ComponentModel.Win32Exception(win32Error); 1700throw new System.ComponentModel.Win32Exception(win32Error);
Core\CSharp\System\Windows\Input\Cursor.cs (1)
234throw new Win32Exception(errorCode);
Core\CSharp\System\Windows\Input\TextCompositionManager.cs (1)
526throw new System.ComponentModel.Win32Exception(win32Err);
Core\CSharp\System\Windows\Interop\D3DImage.cs (1)
783throw new Win32Exception();
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (1)
294throw new System.ComponentModel.Win32Exception();
Core\CSharp\System\Windows\Media\Imaging\BitmapDownload.cs (1)
174throw new Win32Exception();
Core\CSharp\System\Windows\Media\Imaging\WriteableBitmap.cs (1)
1536throw new Win32Exception();
Core\CSharp\System\Windows\UIElement.cs (1)
1168throw new Win32Exception();
Shared\MS\Internal\SafeSecurityHelper.cs (1)
75throw new System.ComponentModel.Win32Exception(win32Err);
Shared\MS\Internal\SecurityHelper.cs (1)
511throw new Win32Exception( hr ) ;
PresentationFramework (59)
src\Framework\MS\Internal\AppModel\AppSecurityManager.cs (1)
223new System.ComponentModel.Win32Exception(/*uses the last Win32 error*/));
src\Framework\System\Windows\Controls\Primitives\Popup.cs (1)
3321throw new Win32Exception();
src\Framework\System\windows\Documents\CaretElement.cs (2)
1032throw new System.ComponentModel.Win32Exception(win32Error); 1134throw new System.ComponentModel.Win32Exception(win32Error);
src\Framework\System\Windows\Documents\TextFindEngine.cs (1)
602throw new System.ComponentModel.Win32Exception(win32Error);
src\Framework\System\Windows\Standard\ErrorCodes.cs (1)
521return new Win32Exception(code, message);
src\Framework\System\Windows\Standard\NativeMethods.cs (12)
2529throw new Win32Exception(); 2610throw new Win32Exception(); 2633throw new Win32Exception(); 2656throw new Win32Exception(); 2905throw new Win32Exception(); 2927throw new Win32Exception(); 3112throw new Win32Exception(); 3173throw new Win32Exception(); 3226throw new Win32Exception(); 3351throw new Win32Exception(); 3489throw new Win32Exception(); 3526throw new Win32Exception();
src\Framework\System\Windows\SystemParameters.cs (40)
131throw new Win32Exception(); 167throw new Win32Exception(); 205throw new Win32Exception(); 239throw new Win32Exception(); 334throw new Win32Exception(); 368throw new Win32Exception(); 402throw new Win32Exception(); 514throw new Win32Exception(); 638throw new Win32Exception(); 671throw new Win32Exception(); 704throw new Win32Exception(); 737throw new Win32Exception(); 770throw new Win32Exception(); 803throw new Win32Exception(); 844throw new Win32Exception(); 880throw new Win32Exception(); 917throw new Win32Exception(); 1104throw new Win32Exception(); 1136throw new Win32Exception(); 1170throw new Win32Exception(); 1278throw new Win32Exception(); 1314throw new Win32Exception(); 1352throw new Win32Exception(); 1385throw new Win32Exception(); 1418throw new Win32Exception(); 1451throw new Win32Exception(); 1507throw new Win32Exception(); 1540throw new Win32Exception(); 1573throw new Win32Exception(); 1623throw new Win32Exception(); 1656throw new Win32Exception(); 1689throw new Win32Exception(); 1973throw new Win32Exception(); 2006throw new Win32Exception(); 2062throw new Win32Exception(); 2097throw new Win32Exception(); 2131throw new Win32Exception(); 2165throw new Win32Exception(); 5559throw new Win32Exception(); 6398throw new Win32Exception();
src\Framework\System\Windows\Window.cs (1)
4007throw new Win32Exception();
SMSvcHost (3)
System\ServiceModel\Activation\ListenerAdapterBase.cs (3)
44throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception()); 262throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(hresult)); 276throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(hresult));
System (90)
compmod\microsoft\win32\NativeMethods.cs (1)
247throw new Win32Exception();
compmod\system\codedom\compiler\Executor.cs (1)
324Win32Exception win32Exception = new Win32Exception(err);
net\System\Net\_NTAuthentication.cs (11)
184throw new Win32Exception((int)SecurityStatus.InvalidHandle); 521throw new Win32Exception((int)result); 581throw new Win32Exception((int)SecurityStatus.InvalidHandle); 599throw new Win32Exception((int)status); 752Win32Exception exception = new Win32Exception((int) statusCode); 909Win32Exception exception = new Win32Exception((int) statusCode); 997throw new Win32Exception(errorCode); 1061throw new Win32Exception(errorCode); 1114throw new Win32Exception(errorCode); 1183throw new Win32Exception(errorCode); 1241throw new Win32Exception(errorCode);
net\System\Net\_SecureChannel.cs (3)
1362throw new Win32Exception((int)status); 1378throw new Win32Exception((int)status); 1989return this.Done ? null : new Win32Exception((int)Status);
net\System\Net\_SSPIWrapper.cs (5)
33throw new Win32Exception(errorCode); 135throw new Win32Exception(errorCode); 175throw new Win32Exception(errorCode); 193throw new Win32Exception(errorCode); 219throw new Win32Exception(errorCode);
net\System\Net\Cache\IERequestCache.cs (12)
131Win32Exception win32Exception = new Win32Exception((int)entry.Error); 315if(Logging.On)Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_lookup_failed, "WinInetCache.Retrieve()", new Win32Exception((int)entry.Error).Message)); 319Win32Exception win32Exception = new Win32Exception((int)entry.Error); 465Logging.PrintWarning(Logging.RequestCache, SR.GetString(SR.net_log_cache_create_failed, new Win32Exception((int)entry.Error).Message)); 470Win32Exception win32Exception = new Win32Exception((int)entry.Error); 589Logging.PrintWarning(Logging.RequestCache, SR.GetString(SR.net_log_cache_update_failed, "WinInetCache.Update()", entry.Key, new Win32Exception((int)entry.Error).Message)); 594Win32Exception win32Exception = new Win32Exception((int)entry.Error); 1023if(Logging.On)Logging.PrintWarning(Logging.RequestCache, SR.GetString(SR.net_log_cache_delete_failed, "WinInetWriteStream.Close()", m_Entry.Key, new Win32Exception((int)m_Entry.Error).Message)); 1057if(Logging.On)Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_commit_failed, "WinInetWriteStream.Close()", m_Entry.Key, new Win32Exception((int)m_Entry.Error).Message)); 1073Win32Exception win32Exception = new Win32Exception((int)m_Entry.Error); 1091if(Logging.On)Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_update_failed, "WinInetWriteStream.Close(), Key = " + m_Entry.Key, new Win32Exception((int)m_Entry.Error).Message)); 1094Win32Exception win32Exception = new Win32Exception((int)m_Entry.Error);
net\System\Net\NetworkInformation\ping.cs (3)
636throw new Win32Exception(); // Gets last error 643throw new Win32Exception(); // Gets last error 714throw new Win32Exception(error);
net\System\Net\NetworkInformation\TeredoHelper.cs (1)
108throw new Win32Exception((int)err);
net\System\Net\SecureProtocols\_NegoState.cs (2)
651e = new Win32Exception((int)error); 810e = new System.ComponentModel.Win32Exception((int) statusCode);
net\System\Net\UnsafeNativeMethods.cs (1)
1720throw new Win32Exception(); // Calls GetLastError.
services\io\system\io\FileSystemWatcher.cs (2)
486OnError(new ErrorEventArgs(new Win32Exception((int)errorCode))); 750OnError(new ErrorEventArgs(new Win32Exception()));
services\monitoring\system\diagnosticts\CounterSampleCalculator.cs (1)
237throw new Win32Exception( Marshal.GetLastWin32Error() );
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (2)
1200throw new Win32Exception(NativeMethods.ERROR_ACCESS_DENIED); 1204throw new Win32Exception(Marshal.GetHRForException(e));
services\monitoring\system\diagnosticts\Process.cs (21)
271throw new Win32Exception(); 314throw new Win32Exception(); 733throw new Win32Exception(); 750throw new Win32Exception(); 775throw new Win32Exception(); 804throw new Win32Exception(); 907throw new Win32Exception(); 924throw new Win32Exception(); 1439throw new Win32Exception(); 1469throw new Win32Exception(); 1474throw new Win32Exception(); 1486throw new Win32Exception(); 1821throw new Win32Exception(); 1842throw new Win32Exception(); 1847throw new Win32Exception(); 1894throw new Win32Exception(); 1934throw new Win32Exception(); 2104throw new Win32Exception(errorCode); 2138throw new Win32Exception(errorCode); 2266throw new Win32Exception(error); 2371throw new Win32Exception();
services\monitoring\system\diagnosticts\ProcessManager.cs (14)
271throw new Win32Exception(5); 283throw new Win32Exception(result); 295throw new Win32Exception(result); 357if (handle == (IntPtr)(-1)) throw new Win32Exception(); 427if (handle == (IntPtr)(-1)) throw new Win32Exception(); 536throw new Win32Exception(); 618throw new Win32Exception(); 623throw new Win32Exception(); 653throw new Win32Exception(); 670throw new Win32Exception(); 677if (ret == 0) throw new Win32Exception(); 682if (ret == 0) throw new Win32Exception(); 739throw new InvalidOperationException(SR.GetString(SR.CantGetProcessId), new Win32Exception(status)); 1107throw new InvalidOperationException(SR.GetString(SR.CouldntGetProcessInfos), new Win32Exception(status));
services\monitoring\system\diagnosticts\ProcessThread.cs (7)
120throw new Win32Exception(); 142throw new Win32Exception(); 158throw new Win32Exception(); 182throw new Win32Exception(); 200throw new Win32Exception(); 361throw new Win32Exception(); 382throw new Win32Exception();
services\monitoring\system\diagnosticts\SharedUtils.cs (2)
56newException = new Win32Exception(); 58newException = new Win32Exception(error);
sys\System\EnvironmentHelpers.cs (1)
42throw new Win32Exception();
System.AddIn (1)
System\Addin\Hosting\AddInProcess.cs (1)
331throw new System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error()); // call failed
System.Core (7)
System\Diagnostics\Eventing\EventProvider.cs (1)
120throw new Win32Exception((int)status);
System\Diagnostics\Eventing\Reader\EventLogException.cs (1)
77Win32Exception win32Exception = new Win32Exception(errorCode);
System\Diagnostics\PerformanceData\CounterSet.cs (1)
243throw new Win32Exception((int) Status);
System\Diagnostics\PerformanceData\CounterSetInstance.cs (2)
69throw new Win32Exception(Status); 73throw new Win32Exception(Status);
System\Diagnostics\PerformanceData\CounterSetInstanceCounterDataSet.cs (1)
153throw new Win32Exception((int) Status);
System\Diagnostics\PerformanceData\PerfProviderCollection.cs (1)
30throw new Win32Exception((int) Status);
System.Data (6)
fx\src\data\System\Data\SqlClient\SqlException.cs (1)
168innerException = new Win32Exception(errorCollection[0].Win32ErrorCode);
fx\src\data\System\Data\SQLTypes\SQLFileStream.cs (3)
737System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception ( unchecked ( (int) error ) ); 745System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception ( UnsafeNativeMethods.ERROR_INVALID_HANDLE ); 769System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception ( Marshal.GetLastWin32Error() );
fx\src\data\System\Data\SQLTypes\UnsafeNativeMethods.cs (2)
104System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception(lastError); 147throw new System.ComponentModel.Win32Exception();
System.Drawing (17)
commonui\System\Drawing\Advanced\Font.cs (1)
899throw new Win32Exception();
commonui\System\Drawing\BufferedGraphicsContext.cs (1)
492ex = new Win32Exception(Marshal.GetLastWin32Error());
commonui\System\Drawing\Graphics.cs (1)
930throw new Win32Exception();
commonui\System\Drawing\Icon.cs (4)
743throw new Win32Exception(SafeNativeMethods.ERROR_INVALID_PARAMETER); 751throw new Win32Exception(SafeNativeMethods.ERROR_INVALID_PARAMETER); 773throw new Win32Exception(SafeNativeMethods.ERROR_INVALID_PARAMETER); 777throw new Win32Exception();
commonui\System\Drawing\Printing\DefaultPrintController.cs (4)
77throw new Win32Exception(error); 139throw new Win32Exception(); 162throw new Win32Exception(); 193throw new Win32Exception();
commonui\System\Drawing\Printing\PrinterSettings.cs (6)
251throw new Win32Exception(); 865throw new Win32Exception(); 888throw new Win32Exception(); 920throw new Win32Exception(); 944throw new Win32Exception(); 1020throw new Win32Exception();
System.IdentityModel (34)
System\IdentityModel\Claims\WindowsClaimSet.cs (2)
338throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(dwErrorCode)); 342throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(dwErrorCode));
System\IdentityModel\Privilege.cs (6)
120throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 132throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 147throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 203throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 229throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 247throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error));
System\IdentityModel\RijndaelCryptoServiceProvider.cs (1)
378string reason = (err != 0) ? new Win32Exception(err).Message : String.Empty;
System\IdentityModel\SafeCryptHandles.cs (1)
116string reason = (err != 0) ? new Win32Exception(err).Message : String.Empty;
System\IdentityModel\Selectors\WindowsUserNameSecurityTokenAuthenticator.cs (1)
55throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenValidationException(SR.GetString(SR.FailLogonUser, userName), new Win32Exception(error)));
System\IdentityModel\Selectors\X509SecurityTokenAuthenticator.cs (6)
175throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(NativeMethods.LsaNtStatusToWinError(status))); 188message = SR.GetString(SR.RevertingPrivilegeFailed, new Win32Exception(revertResult)); 209throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(NativeMethods.LsaNtStatusToWinError(status))); 217throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(dwErrorCode)); 270throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(NativeMethods.LsaNtStatusToWinError(status))); 274throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(NativeMethods.LsaNtStatusToWinError(subStatus)));
System\IdentityModel\SspiWrapper.cs (7)
318throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 387throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 405throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 424throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 443throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 585throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 694throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode));
System\IdentityModel\Tokens\KerberosReceiverSecurityToken.cs (4)
238new SecurityTokenException(SR.GetString(SR.KerberosMultilegsNotSupported), new Win32Exception(statusCode))); 243new SecurityTokenException(SR.GetString(SR.KerberosApReqInvalidOrOutOfMemory), new Win32Exception(statusCode))); 248new SecurityTokenException(SR.GetString(SR.FailAcceptSecurityContext), new Win32Exception(statusCode))); 265throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(statusCode));
System\IdentityModel\Tokens\KerberosRequestorSecurityToken.cs (2)
187new SecurityTokenException(SR.GetString(SR.KerberosMultilegsNotSupported), new Win32Exception(statusCode))); 192new SecurityTokenException(SR.GetString(SR.FailInitializeSecurityContext), new Win32Exception(statusCode)));
System\IdentityModel\Tokens\RsaSecurityToken.cs (1)
106new InvalidOperationException(SR.GetString(SR.FailedToDeleteKeyContainerFile), new Win32Exception(error)));
System\IdentityModel\Tokens\SessionSecurityToken.cs (2)
1043throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.ID4248, windowsLogonName), new Win32Exception(errorCode))); 1048throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.ID4248, windowsLogonName), new Win32Exception(errorCode)));
System\IdentityModel\Tokens\WindowsUserNameSecurityTokenHandler.cs (1)
98throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenValidationException(SR.GetString(SR.ID4063, userName), new Win32Exception(error)));
System.IdentityModel.Selectors (13)
infocard\client\System\IdentityModel\Selectors\CardSpaceShim.cs (1)
99throw NativeMethods.ThrowWin32ExceptionWithContext(new Win32Exception(), implDllPath);
infocard\client\System\IdentityModel\Selectors\InfoCardKeyedHashAlgorithm.cs (3)
61throw IDT.ThrowHelperError(new Win32Exception(status)); 145throw IDT.ThrowHelperError(new Win32Exception(status)); 203throw IDT.ThrowHelperError(new Win32Exception(status));
infocard\client\System\IdentityModel\Selectors\InfoCardRSACryptoProvider.cs (4)
99throw IDT.ThrowHelperError(new Win32Exception(status)); 131throw IDT.ThrowHelperError(new Win32Exception(status)); 167throw IDT.ThrowHelperError(new Win32Exception(status)); 211throw IDT.ThrowHelperError(new Win32Exception(status));
infocard\client\System\IdentityModel\Selectors\InfoCardSymmetricAlgorithm.cs (3)
185throw IDT.ThrowHelperError(new Win32Exception(status)); 248throw IDT.ThrowHelperError(new Win32Exception(status)); 296throw IDT.ThrowHelperError(new Win32Exception(status));
infocard\client\System\IdentityModel\Selectors\InfoCardSymmetricCrypto.cs (1)
141throw IDT.ThrowHelperError(new Win32Exception(status));
infocard\client\System\IdentityModel\Selectors\NativeMethods.cs (1)
29ThrowWin32ExceptionWithContext(new Win32Exception(), procName);
System.Messaging (3)
System\Messaging\AccessControlList.cs (1)
169throw new Win32Exception(err);
System\Messaging\MessageQueue.cs (2)
3499throw new Win32Exception(); 3516throw new Win32Exception();
System.Net (1)
net\PeerToPeer\PeerToPeerException.cs (1)
113p2pEx = new PeerToPeerException(message, new Win32Exception(hr, NativeMessage));
System.Runtime.Remoting (3)
channels\core\corechannel.cs (3)
926throw new Win32Exception(lastError); 933throw new Win32Exception(lastError); 960throw new Win32Exception(lastError);
System.ServiceModel (68)
System\ServiceModel\Activation\SharedMemory.cs (4)
47throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 98throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 111throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(UnsafeNativeMethods.ERROR_FILE_NOT_FOUND)); 131throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode));
System\ServiceModel\Activation\Utility.cs (16)
40Exception exception = new Win32Exception(); 53Exception exception = new Win32Exception(); 68throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 83throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 96throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 106Exception exception = new Win32Exception(); 119Exception exception = new Win32Exception(); 194throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 222throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 248throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 256throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception()); 280throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception()); 312throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 322throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 418throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 426throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception());
System\ServiceModel\Channels\AppContainerInfo.cs (3)
191throw FxTrace.Exception.AsError(new Win32Exception(errorCode)); 205throw FxTrace.Exception.AsError(new Win32Exception(errorCode)); 256throw FxTrace.Exception.AsError(new Win32Exception(error));
System\ServiceModel\Channels\PeerHelpers.cs (1)
736return new Win32Exception(Marshal.GetLastWin32Error());
System\ServiceModel\Channels\SelfSignedCertificate.cs (3)
120PeerExceptionHelper.ThrowInvalidOperation_PeerCertGenFailure(new Win32Exception(error)); 185PeerExceptionHelper.ThrowInvalidOperation_PeerCertGenFailure(new Win32Exception(error)); 197PeerExceptionHelper.ThrowInvalidOperation_PeerCertGenFailure(new Win32Exception(error));
System\ServiceModel\Channels\UnsafeNativeMethods.cs (5)
826throw FxTrace.Exception.AsError(new Win32Exception(errorCode)); 854throw FxTrace.Exception.AsError(new Win32Exception(error)); 876throw FxTrace.Exception.AsError(new Win32Exception(errorCode)); 894throw FxTrace.Exception.AsError(new Win32Exception(errorCode)); 1216throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception());
System\ServiceModel\ComIntegration\SafeNativeMethods.cs (15)
584throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(status)); 590throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(SafeNativeMethods.ERROR_INVALID_HANDLE)); 605throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(status)); 611throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(SafeNativeMethods.ERROR_INVALID_HANDLE)); 625throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(status)); 631throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(SafeNativeMethods.ERROR_INVALID_HANDLE)); 647throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(SafeNativeMethods.ERROR_NOT_SUPPORTED)); 666throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(SafeNativeMethods.ERROR_NOT_SUPPORTED)); 678throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(status)); 684throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(SafeNativeMethods.ERROR_INVALID_HANDLE)); 698throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(status)); 704throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(SafeNativeMethods.ERROR_INVALID_HANDLE)); 717throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(status)); 723throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(SafeNativeMethods.ERROR_INVALID_HANDLE)); 772throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(status));
System\ServiceModel\Dispatcher\SecurityImpersonationBehavior.cs (5)
412throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SR.GetString(SR.DownlevelNameCannotMapToUpn, downlevelName), new Win32Exception(errorCode))); 417throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SR.GetString(SR.DownlevelNameCannotMapToUpn, downlevelName), new Win32Exception(errorCode))); 503throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 510throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error)); 540new Win32Exception(error).Message)));
System\ServiceModel\Security\TlsSspiNegotiation.cs (8)
215throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)SecurityStatus.InvalidHandle)); 234throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)SecurityStatus.InvalidHandle)); 274throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)SecurityStatus.InvalidHandle)); 417throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(statusCode)); 456throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(statusCode)); 485throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 524throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 676throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)SecurityStatus.InvalidHandle));
System\ServiceModel\Security\Tokens\IssuedSecurityTokenProvider.cs (1)
1080System.ServiceModel.Dispatcher.ErrorBehavior.ThrowAndCatch(new Win32Exception(error));
System\ServiceModel\Security\WindowsSspiNegotiation.cs (5)
262throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 300throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode)); 572throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)SecurityStatus.InvalidHandle)); 618throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)SecurityStatus.InvalidHandle)); 626throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception((int)status));
System\ServiceModel\UpnEndpointIdentity.cs (2)
154throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new Win32Exception(errorCode)); 159throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new Win32Exception(errorCode));
System.ServiceModel.Activation (1)
System\ServiceModel\Activation\ServiceMemoryGates.cs (1)
75new InvalidOperationException(SR.Hosting_GetGlobalMemoryFailed, new Win32Exception(error)));
System.ServiceModel.Internals (4)
System\Runtime\Interop\UnsafeNativeMethods.cs (2)
111throw Fx.Exception.AsError(new System.ComponentModel.Win32Exception(error)); 124throw Fx.Exception.AsError(new System.ComponentModel.Win32Exception(error));
System\Runtime\IOThreadTimer.cs (2)
635Exception exception = new Win32Exception(); 645throw Fx.Exception.AsError(new Win32Exception());
System.ServiceModel.Routing (1)
System\ServiceModel\Routing\MessageRpc.cs (1)
70Win32Exception errorDetail = new Win32Exception(ERROR_BAD_IMPERSONATION_LEVEL);
System.Windows.Forms (21)
winforms\Managed\System\WinForms\ComboBox.cs (2)
741throw new Win32Exception(); 2179throw new Win32Exception();
winforms\Managed\System\WinForms\ContainerControl.cs (1)
741throw new Win32Exception();
winforms\Managed\System\WinForms\Control.cs (4)
7057throw new Win32Exception(NativeMethods.ERROR_INVALID_HANDLE); 10575throw new Win32Exception(); 11249throw new Win32Exception(n); 11258throw new Win32Exception(n);
winforms\Managed\System\WinForms\ControlPaint.cs (3)
211throw new Win32Exception(); 217throw new Win32Exception(); 368throw new Win32Exception();
winforms\Managed\System\WinForms\Form.cs (1)
6470throw new Win32Exception();
winforms\Managed\System\WinForms\ListBox.cs (2)
1490throw new Win32Exception(); 1536throw new Win32Exception();
winforms\Managed\System\WinForms\NativeWindow.cs (3)
609throw new Win32Exception(); 1577throw new Win32Exception(); 1666throw new Win32Exception(err);
winforms\Managed\System\WinForms\SendKeys.cs (1)
688throw new Win32Exception();
winforms\Managed\System\WinForms\ToolStripDropDown.cs (1)
2025throw new Win32Exception();
winforms\Managed\System\WinForms\ToolStripDropTargetManager.cs (2)
265throw new Win32Exception(n); 280throw new Win32Exception(n);
winforms\Managed\System\WinForms\ToolStripTextBox.cs (1)
854throw new Win32Exception();
System.Workflow.ComponentModel (26)
AuthoringOM\Design\DesignerHelpers.cs (26)
922throw new Win32Exception(Marshal.GetLastWin32Error()); 927throw new Win32Exception(Marshal.GetLastWin32Error()); 931throw new Win32Exception(Marshal.GetLastWin32Error()); 937throw new Win32Exception(Marshal.GetLastWin32Error()); 943throw new Win32Exception(Marshal.GetLastWin32Error()); 956Win32Exception e = new Win32Exception(); 964Win32Exception e = new Win32Exception(); 972Win32Exception e = new Win32Exception(); 980Win32Exception e = new Win32Exception(); 988Win32Exception e = new Win32Exception(); 1032throw new Win32Exception(Marshal.GetLastWin32Error()); 1039throw new Win32Exception(Marshal.GetLastWin32Error()); 1042throw new Win32Exception(Marshal.GetLastWin32Error()); 1049throw new Win32Exception(Marshal.GetLastWin32Error()); 1052throw new Win32Exception(Marshal.GetLastWin32Error()); 1055throw new Win32Exception(Marshal.GetLastWin32Error()); 1059throw new Win32Exception(Marshal.GetLastWin32Error()); 1068throw new Win32Exception(Marshal.GetLastWin32Error()); 1071throw new Win32Exception(Marshal.GetLastWin32Error()); 1078throw new Win32Exception(Marshal.GetLastWin32Error()); 1081throw new Win32Exception(Marshal.GetLastWin32Error()); 1084throw new Win32Exception(Marshal.GetLastWin32Error()); 1088throw new Win32Exception(Marshal.GetLastWin32Error()); 1097throw new Win32Exception(Marshal.GetLastWin32Error()); 1116throw new Win32Exception(Marshal.GetLastWin32Error()); 1130Win32Exception e = new Win32Exception();
UIAutomationClient (2)
MS\Internal\Automation\Misc.cs (1)
291throw new Win32Exception(errorCode);
MS\Internal\Automation\WinEventWrap.cs (1)
134throw new Win32Exception();
UIAutomationClientsideProviders (4)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
1491throw new Win32Exception();
MS\Internal\AutomationProxies\Input.cs (2)
128throw new Win32Exception(Marshal.GetLastWin32Error()); 151throw new Win32Exception(Marshal.GetLastWin32Error());
MS\Internal\AutomationProxies\Misc.cs (1)
1737throw new Win32Exception(errorCode);
WindowsBase (52)
Base\MS\Internal\Interop\ErrorCodes.cs (2)
447e = new Win32Exception(Code); 451e = new Win32Exception(Code, message);
Base\System\Windows\SplashScreen.cs (1)
197throw new Win32Exception();
Base\System\Windows\Threading\Dispatcher.cs (1)
2396throw new Win32Exception();
Shared\MS\Win32\HwndWrapper.cs (1)
98throw new System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error());
Shared\MS\Win32\SafeNativeMethodsCLR.cs (10)
90throw new Win32Exception(win32Err); 108throw new Win32Exception(); 157throw new Win32Exception(); 195throw new Win32Exception(); 210throw new Win32Exception(); 233throw new Win32Exception(); 278throw new Win32Exception(); 296throw new System.ComponentModel.Win32Exception(win32Err); 313throw new Win32Exception(); 415throw new Win32Exception();
Shared\MS\Win32\SafeNativeMethodsOther.cs (3)
187throw new Win32Exception(win32Error); 251throw new Win32Exception(Marshal.GetLastWin32Error()); 264throw new Win32Exception(Marshal.GetLastWin32Error());
Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (21)
262throw new Win32Exception(); 449throw new Win32Exception(); 486throw new Win32Exception(); 535throw new Win32Exception(); 640throw new Win32Exception(); 697throw new Win32Exception(win32Err); 743throw new Win32Exception(); 835throw new Win32Exception(win32Err); 853throw new Win32Exception(win32Err); 1056throw new Win32Exception(); 1100throw new Win32Exception(errorCode); 1158throw new Win32Exception(); 1199throw new Win32Exception(); 1507throw new Win32Exception(); 1576throw new Win32Exception(); 1649throw new Win32Exception(); 1957throw new Win32Exception(); 1978throw new Win32Exception(); 2004throw new Win32Exception(); 2060throw new Win32Exception(); 2081throw new Win32Exception();
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (13)
63throw new Win32Exception(); 304throw new Win32Exception(); 327throw new Win32Exception(); 351throw new Win32Exception(); 373throw new Win32Exception(); 722throw new System.ComponentModel.Win32Exception(errorCode); 828throw new Win32Exception(error); 920throw new Win32Exception(); 981throw new Win32Exception(); 1010throw new Win32Exception(); 1029throw new Win32Exception(); 1425throw new System.ComponentModel.Win32Exception(win32error); 1605throw new Win32Exception();
129 references to Win32Exception
PresentationCore (34)
Core\CSharp\MS\Internal\Automation\ElementUtil.cs (1)
157catch (System.ComponentModel.Win32Exception)
Core\CSharp\System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
66catch(Win32Exception) {} 100catch(Win32Exception) {}
Core\CSharp\System\Windows\Input\MouseDevice.cs (2)
147catch (System.ComponentModel.Win32Exception) 181catch (System.ComponentModel.Win32Exception)
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (8)
193catch(System.ComponentModel.Win32Exception) 229catch(System.ComponentModel.Win32Exception) 260catch(System.ComponentModel.Win32Exception) 632catch(System.ComponentModel.Win32Exception) 666catch(System.ComponentModel.Win32Exception) 719catch(System.ComponentModel.Win32Exception) 922catch(System.ComponentModel.Win32Exception) 937catch(System.ComponentModel.Win32Exception)
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (20)
70catch(System.ComponentModel.Win32Exception) 81catch(System.ComponentModel.Win32Exception) 143catch(System.ComponentModel.Win32Exception) 178catch(System.ComponentModel.Win32Exception) 204catch(System.ComponentModel.Win32Exception) 246catch(System.ComponentModel.Win32Exception) 366catch(System.ComponentModel.Win32Exception) 412catch(System.ComponentModel.Win32Exception) 546catch(System.ComponentModel.Win32Exception) 743catch(System.ComponentModel.Win32Exception) 849catch(System.ComponentModel.Win32Exception) 990catch(System.ComponentModel.Win32Exception) 1003catch(System.ComponentModel.Win32Exception) 1034catch(System.ComponentModel.Win32Exception) 1086catch(System.ComponentModel.Win32Exception) 1108catch(System.ComponentModel.Win32Exception) 1256catch(System.ComponentModel.Win32Exception) 1268catch(System.ComponentModel.Win32Exception) 1352catch(System.ComponentModel.Win32Exception) 1367catch(System.ComponentModel.Win32Exception)
Core\CSharp\System\Windows\Interop\HwndTarget.cs (1)
547catch (Win32Exception)
PresentationFramework (4)
src\Framework\MS\Internal\AppModel\ApplicationProxyInternal.cs (1)
380catch (System.ComponentModel.Win32Exception)
src\Framework\System\Windows\Automation\Peers\WindowAutomationPeer.cs (1)
92catch(Win32Exception) {}
src\Framework\System\Windows\Controls\Primitives\Popup.cs (2)
2780catch(Win32Exception) 3793catch(Win32Exception)
SMSvcHost (2)
System\ServiceModel\Activation\SharingService.cs (1)
174catch (Win32Exception exception)
System\ServiceModel\Activation\SMSvcHost.cs (1)
81catch (Win32Exception exception)
System (42)
compmod\system\codedom\compiler\Executor.cs (1)
324Win32Exception win32Exception = new Win32Exception(err);
compmod\system\componentmodel\WarningException.cs (1)
27/// <para>Initializes a new instance of the <see cref='System.ComponentModel.Win32Exception'/> class with the last Win32 error
compmod\system\componentmodel\Win32Exception.cs (3)
37/// <para>Initializes a new instance of the <see cref='System.ComponentModel.Win32Exception'/> class with the last Win32 error 44/// <para>Initializes a new instance of the <see cref='System.ComponentModel.Win32Exception'/> class with the specified error.</para> 50/// <para>Initializes a new instance of the <see cref='System.ComponentModel.Win32Exception'/> class with the specified error and the
net\System\Net\_ConnectStream.cs (2)
1431Win32Exception win32Exception = exception.InnerException as Win32Exception;
net\System\Net\_NetworkingPerfCounters.cs (3)
148catch (Win32Exception e) 216catch (Win32Exception e) 342catch (Win32Exception e)
net\System\Net\_NTAuthentication.cs (2)
752Win32Exception exception = new Win32Exception((int) statusCode); 909Win32Exception exception = new Win32Exception((int) statusCode);
net\System\Net\_SecureChannel.cs (1)
1986internal Win32Exception GetException() {
net\System\Net\Cache\IERequestCache.cs (6)
131Win32Exception win32Exception = new Win32Exception((int)entry.Error); 319Win32Exception win32Exception = new Win32Exception((int)entry.Error); 470Win32Exception win32Exception = new Win32Exception((int)entry.Error); 594Win32Exception win32Exception = new Win32Exception((int)entry.Error); 1073Win32Exception win32Exception = new Win32Exception((int)m_Entry.Error); 1094Win32Exception win32Exception = new Win32Exception((int)m_Entry.Error);
net\System\Net\HttpListener.cs (1)
2316catch (Win32Exception exception)
net\System\Net\HttpListenerResponse.cs (2)
367catch (Win32Exception) { 442catch (Win32Exception) {
net\System\Net\HttpWebRequest.cs (3)
5531catch (Win32Exception) 5548catch (Win32Exception) 5657catch (System.ComponentModel.Win32Exception w32Exception) {
net\System\Net\mail\SmtpNegotiateAuthenticationModule.cs (2)
137catch (Win32Exception) { 185catch (Win32Exception) {
net\System\Net\NetRegistryConfiguration.cs (1)
178catch (Win32Exception) { }
net\System\Net\SecureProtocols\_NegoState.cs (6)
219catch (Win32Exception e) 490Win32Exception win32exception = null; 644Win32Exception e = null; 705Win32Exception win32exception = exception as Win32Exception; 803private unsafe byte[] GetOutgoingBlob(byte[] incomingBlob, ref Win32Exception e) {
net\System\Net\SecureProtocols\_SslState.cs (1)
181catch (Win32Exception e) {
services\monitoring\system\diagnosticts\EventLogInternal.cs (3)
766catch (Win32Exception e) { 1304Win32Exception e = null; 1334Win32Exception e = null;
services\monitoring\system\diagnosticts\ProcessManager.cs (1)
700catch (Win32Exception e)
services\monitoring\system\diagnosticts\SharedUtils.cs (3)
43internal static Win32Exception CreateSafeWin32Exception() { 47internal static Win32Exception CreateSafeWin32Exception(int error) { 48Win32Exception newException = null;
System.Core (1)
System\Diagnostics\Eventing\Reader\EventLogException.cs (1)
77Win32Exception win32Exception = new Win32Exception(errorCode);
System.Data (4)
fx\src\data\System\Data\SQLTypes\SQLFileStream.cs (3)
737System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception ( unchecked ( (int) error ) ); 745System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception ( UnsafeNativeMethods.ERROR_INVALID_HANDLE ); 769System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception ( Marshal.GetLastWin32Error() );
fx\src\data\System\Data\SQLTypes\UnsafeNativeMethods.cs (1)
104System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception(lastError);
System.Drawing (1)
commonui\System\Drawing\BufferedGraphicsContext.cs (1)
490Win32Exception ex = null;
System.IdentityModel (1)
System\IdentityModel\Tokens\KerberosRequestorSecurityToken.cs (1)
69catch (Win32Exception e)
System.IdentityModel.Selectors (3)
infocard\client\System\IdentityModel\Selectors\CardSpaceShim.cs (1)
191catch (Win32Exception)
infocard\client\System\IdentityModel\Selectors\NativeMethods.cs (2)
34public static Win32Exception ThrowWin32ExceptionWithContext(Win32Exception wex, string context)
System.ServiceModel (17)
System\ServiceModel\Channels\PipeConnection.cs (2)
2062catch (Win32Exception e) 2542catch (Win32Exception e)
System\ServiceModel\Channels\SharedConnectionListener.cs (12)
555catch (Win32Exception exception) 568catch (Win32Exception exception) 577catch (Win32Exception exception) 585catch (Win32Exception exception) 674catch (Win32Exception exception) 691catch (Win32Exception exception) 1100catch (Win32Exception exception) 1107Exception WrapEndpointReadingException(Win32Exception exception) 1162catch (Win32Exception exception) 1183Win32Exception win32Exception = exception.InnerException as Win32Exception; 1239catch (Win32Exception exception)
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (1)
683return (e is System.ComponentModel.Win32Exception
System\ServiceModel\Security\NegotiationTokenAuthenticator.cs (1)
916if (e is SecurityTokenValidationException || e is System.ComponentModel.Win32Exception)
System\ServiceModel\Security\TlsSspiNegotiation.cs (1)
109catch (Win32Exception ex)
System.ServiceModel.Internals (4)
System\Runtime\Diagnostics\DiagnosticTraceBase.cs (2)
358Win32Exception win32Exception = exception as Win32Exception;
System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (2)
765System.ComponentModel.Win32Exception win32Exception = exception as System.ComponentModel.Win32Exception;
System.ServiceModel.Routing (1)
System\ServiceModel\Routing\MessageRpc.cs (1)
70Win32Exception errorDetail = new Win32Exception(ERROR_BAD_IMPERSONATION_LEVEL);
System.Transactions (2)
System\Transactions\Trace\DiagnosticTrace.cs (2)
697Win32Exception win32Exception = exception as Win32Exception;
System.Web.DataVisualization (1)
WebForm\ChartWebControl.cs (1)
922catch (Win32Exception)
System.Workflow.ComponentModel (6)
AuthoringOM\Design\DesignerHelpers.cs (6)
956Win32Exception e = new Win32Exception(); 964Win32Exception e = new Win32Exception(); 972Win32Exception e = new Win32Exception(); 980Win32Exception e = new Win32Exception(); 988Win32Exception e = new Win32Exception(); 1130Win32Exception e = new Win32Exception();
UIAutomationClientsideProviders (3)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
1510catch (Win32Exception)
MS\Internal\AutomationProxies\WindowsToolbar.cs (1)
96catch(Win32Exception)
MS\Internal\AutomationProxies\WinFormsSpinner.cs (1)
54catch (Win32Exception)
WindowsBase (3)
Shared\MS\Win32\HwndSubclass.cs (1)
611catch (System.ComponentModel.Win32Exception e)
Shared\MS\Win32\ManagedWndProcTracker.cs (1)
177catch(System.ComponentModel.Win32Exception e)
Shared\MS\Win32\SafeNativeMethodsCLR.cs (1)
558catch (Exception e) when (e is Win32Exception || e is SEHException)