97 references to GetExceptionForHR
Microsoft.AspNetCore.Server.IIS (2)
Core\IO\AsyncIOOperation.cs (1)
104
_exception = new ConnectionResetException("The client has disconnected", Marshal.
GetExceptionForHR
(hr)!);
NativeMethods.cs (1)
366
throw Marshal.
GetExceptionForHR
(hr)!;
Microsoft.CodeAnalysis.Scripting (8)
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
152
Exception e = Marshal.
GetExceptionForHR
(hr);
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (5)
142
throw Marshal.
GetExceptionForHR
(hr);
151
throw Marshal.
GetExceptionForHR
(hr);
171
throw Marshal.
GetExceptionForHR
(hr);
180
throw Marshal.
GetExceptionForHR
(hr);
293
throw Marshal.
GetExceptionForHR
(hr);
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (2)
53
throw Marshal.
GetExceptionForHR
(hr);
62
throw Marshal.
GetExceptionForHR
(hr);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (2)
53
throw Marshal.
GetExceptionForHR
(hr);
62
throw Marshal.
GetExceptionForHR
(hr);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\ComInterop\ExcepInfo.cs (1)
65
Exception exception = Marshal.
GetExceptionForHR
(errorCode) ?? new COMException(null, errorCode);
Microsoft.Diagnostics.DataContractReader (1)
ContractDescriptorTarget.cs (1)
565
throw Marshal.
GetExceptionForHR
(hr) ?? new InvalidOperationException($"Failed to allocate {size} bytes in the target process (HRESULT: 0x{hr:x8}).");
Microsoft.Diagnostics.DataContractReader.Contracts (2)
Contracts\Debugger\Debugger_1.cs (1)
218
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_NOTREADY)!;
Contracts\EcmaMetadata_1.cs (1)
475
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CLDB_E_FILE_CORRUPT)!;
Microsoft.Diagnostics.DataContractReader.Legacy (73)
ClrDataFrame.cs (6)
144
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
198
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
203
throw Marshal.
GetExceptionForHR
(HResults.E_INVALIDARG)!;
320
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
327
throw Marshal.
GetExceptionForHR
(HResults.E_INVALIDARG)!;
552
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
ClrDataMethodInstance.cs (2)
212
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
308
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
ClrDataModule.cs (1)
471
throw Marshal.
GetExceptionForHR
(E_INSUFFICIENT_BUFFER)!;
ClrDataTask.cs (2)
112
throw Marshal.
GetExceptionForHR
(/*E_NOINTERFACE*/ HResults.COR_E_INVALIDCAST)!;
194
throw Marshal.
GetExceptionForHR
(/*E_NOINTERFACE*/ HResults.COR_E_INVALIDCAST)!;
ClrDataValue.cs (1)
159
throw Marshal.
GetExceptionForHR
(/*ERROR_BUFFER_OVERFLOW*/ CorDbgHResults.ERROR_BUFFER_OVERFLOW)!;
Dbi\DacDbiImpl.cs (39)
371
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_MISSING_METADATA)!;
768
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_NOTREADY)!;
799
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_NOTREADY)!;
843
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
849
throw Marshal.
GetExceptionForHR
(HResults.E_INVALIDARG)!;
873
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
1000
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_BAD_THREAD_STATE)!;
1124
throw Marshal.
GetExceptionForHR
(hr)!;
2607
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_TARGET_INCONSISTENT)!;
2644
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_FUNCTION_NOT_IL)!;
2653
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_FUNCTION_NOT_IL)!;
2656
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_FUNCTION_NOT_IL)!;
3149
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3152
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3183
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3189
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3243
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3276
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3288
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3311
?? throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3321
?? throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3339
?? throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3352
?? throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3585
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_ENC_HANGING_FIELD)!;
3601
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_ENC_HANGING_FIELD)!;
3666
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
3790
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_TARGET_INCONSISTENT)!;
4061
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_TARGET_INCONSISTENT)!;
4431
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
5045
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
5196
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
5253
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
5274
throw Marshal.
GetExceptionForHR
(HResults.E_INVALIDARG)!;
5423
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_NOTREADY)!;
5452
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_NOTREADY)!;
5713
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_UNSUPPORTED_DELEGATE)!;
5721
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_UNSUPPORTED_DELEGATE)!;
5771
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_UNSUPPORTED_DELEGATE)!;
5776
throw Marshal.
GetExceptionForHR
(CorDbgHResults.CORDBG_E_UNSUPPORTED_DELEGATE)!;
Dbi\DacDbiImpl.NativeCodeInfo.cs (1)
23
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
Dbi\Helpers\StackWalkHandleData.cs (1)
39
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
MetaDataImportImpl.cs (4)
1410
throw Marshal.
GetExceptionForHR
(CldbHResults.CLDB_E_FILE_CORRUPT)!;
1417
throw Marshal.
GetExceptionForHR
(CldbHResults.CLDB_E_FILE_CORRUPT)!;
1421
throw Marshal.
GetExceptionForHR
(CldbHResults.CLDB_E_FILE_CORRUPT)!;
1663
throw Marshal.
GetExceptionForHR
(CldbHResults.CLDB_E_RECORD_NOTFOUND)!;
SOSDacImpl.cs (16)
724
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
1897
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
1942
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
2102
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
2208
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
2727
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
3483
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
3534
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
4678
throw Marshal.
GetExceptionForHR
(E_ABORT)!;
5049
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
5091
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
5248
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
5739
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
5808
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
5870
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
5939
throw Marshal.
GetExceptionForHR
(HResults.E_FAIL)!;
Microsoft.DotNet.Build.Tasks.Feed (1)
src\common\NativeMethods.cs (1)
25
errorMessage = hardLinkCreated ? null : Marshal.
GetExceptionForHR
(Marshal.GetHRForLastWin32Error()).Message;
PresentationCore (1)
MS\Internal\Text\TextInterface\DWriteUtil.cs (1)
55
System.Exception e = System.Runtime.InteropServices.Marshal.
GetExceptionForHR
(hr);
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
937
throw
GetExceptionForHR
(errorCode)!;
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (1)
651
Exception? ex = Marshal.
GetExceptionForHR
(hr);
System.Windows.Forms (4)
System\Windows\Forms\Control.cs (2)
10305
throw Marshal.
GetExceptionForHR
((int)hr)!;
10314
throw Marshal.
GetExceptionForHR
((int)hr)!;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
179
throw Marshal.
GetExceptionForHR
((int)hr)!;
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (1)
314
throw Marshal.
GetExceptionForHR
((int)hr)!;