97 references to ThrowExceptionForHR
Microsoft.AspNetCore.Cryptography.Internal (1)
SafeHandles\SafeLibraryHandle.cs (1)
202Marshal.ThrowExceptionForHR(hr);
Microsoft.AspNetCore.InternalTesting (1)
DumpCollector\DumpCollector.Windows.cs (1)
26Marshal.ThrowExceptionForHR(err);
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\SafeLibraryHandle.cs (1)
96Marshal.ThrowExceptionForHR(hr);
Microsoft.Build.Framework (1)
NativeMethods.cs (1)
993Marshal.ThrowExceptionForHR(errorCode);
Microsoft.Build.Tasks.Core (1)
Move.cs (1)
269Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Microsoft.CodeAnalysis (3)
DiaSymReader\SymUnmanagedFactory.cs (3)
123Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 132Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 146Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Microsoft.CodeAnalysis.Features (1)
EditAndContinue\EditAndContinueDebugInfoReader.cs (1)
223Marshal.ThrowExceptionForHR(hr);
Microsoft.CodeAnalysis.Scripting (2)
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
182Marshal.ThrowExceptionForHR(hr);
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (1)
437Marshal.ThrowExceptionForHR(CreateAssemblyNameObject(out result, null, 0, IntPtr.Zero));
Microsoft.CSharp (5)
Microsoft\CSharp\RuntimeBinder\ComInterop\ComRuntimeHelpers.cs (5)
81Marshal.ThrowExceptionForHR(hresult); 130Marshal.ThrowExceptionForHR(hresult); 149Marshal.ThrowExceptionForHR(hresult); 154Marshal.ThrowExceptionForHR(ComHresults.E_FAIL); 333Marshal.ThrowExceptionForHR(hresult);
Microsoft.DiaSymReader (6)
Extensions\SymUnmanagedExtensions.Document.cs (2)
100Marshal.ThrowExceptionForHR(document.GetSourceLength(out int length)); 112Marshal.ThrowExceptionForHR(document.GetSourceRange(0, 0, int.MaxValue, int.MaxValue, length, out int bytesRead, blob));
SymUnmanagedFactory.cs (4)
138Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 148Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 167Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 178Marshal.ThrowExceptionForHR(hr);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Interop\JobObjectInfo.cs (1)
318Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Windows\Interop\MemoryInfo.cs (1)
25Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
MiniDumpWriteDump.cs (1)
63Marshal.ThrowExceptionForHR(err);
NuGet.Packaging (11)
Signing\Cms\NativeCms.cs (10)
226Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 231Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 261Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 310Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 361Marshal.ThrowExceptionForHR(NativeMethods.GetHRForWin32Error(err)); 375Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 409Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 431Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 477Marshal.ThrowExceptionForHR(NativeMethods.GetHRForWin32Error(err)); 491Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Signing\Cms\NativeUtility.cs (1)
25Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
PresentationCore (8)
MS\Internal\DpiUtil\DpiUtil+WindowDpiScaleHelper.cs (1)
98Marshal.ThrowExceptionForHR(hr);
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPaneRcw.cs (3)
25Marshal.ThrowExceptionForHR(NativeMethods.WindowsCreateString(typeName, typeName.Length, out hstring)); 29Marshal.ThrowExceptionForHR(NativeMethods.RoGetActivationFactory(hstring, ref iid, out object factory)); 34Marshal.ThrowExceptionForHR(NativeMethods.WindowsDeleteString(hstring));
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettingsRcw.cs (3)
21Marshal.ThrowExceptionForHR(hr); 25Marshal.ThrowExceptionForHR(hr); 31Marshal.ThrowExceptionForHR(hr);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\WinInet.cs (1)
42Marshal.ThrowExceptionForHR(hr);
PresentationFramework (25)
MS\Internal\WindowsRuntime\Generated\WinRT.cs (8)
17Marshal.ThrowExceptionForHR((int)del.DynamicInvoke(invoke_params)); 47Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 137Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 166Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 201Marshal.ThrowExceptionForHR(Platform.CoIncrementMTAUsage(&mtaCookie)); 217Marshal.ThrowExceptionForHR(Platform.CoDecrementMTAUsage(_mtaCookie)); 247Marshal.ThrowExceptionForHR(hr); 255Marshal.ThrowExceptionForHR(_IActivationFactory.Vftbl.ActivateInstance(_IActivationFactory.ThisPtr, out IntPtr instancePtr));
MS\Internal\WindowsRuntime\Generated\WinRT\Context.cs (1)
17Marshal.ThrowExceptionForHR(CoGetObjectContext(ref riid, out IntPtr contextCallbackPtr));
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (3)
96Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr restrictedErrorInfoPtr)); 208Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr ppRestrictedErrorInfo)); 311Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr restrictedErrorInfoPtr));
MS\Internal\WindowsRuntime\Generated\WinRT\IInspectable.cs (1)
112Marshal.ThrowExceptionForHR(hr);
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (8)
217Marshal.ThrowExceptionForHR(_obj.Vftbl.GetGuid_0(ThisPtr, out __return_value__)); 226Marshal.ThrowExceptionForHR(_obj.Vftbl.GetSource_1(ThisPtr, out __retval)); 240Marshal.ThrowExceptionForHR(_obj.Vftbl.GetDescription_2(ThisPtr, out __retval)); 254Marshal.ThrowExceptionForHR(_obj.Vftbl.GetHelpFile_3(ThisPtr, out __retval)); 268Marshal.ThrowExceptionForHR(_obj.Vftbl.GetHelpFileContent_4(ThisPtr, out __retval)); 309Marshal.ThrowExceptionForHR(_obj.Vftbl.GetLanguageException_0(ThisPtr, out __return_value__)); 419Marshal.ThrowExceptionForHR(_obj.Vftbl.GetErrorDetails_0(ThisPtr, out _description, out error, out _restrictedDescription, out _capabilitySid)); 437Marshal.ThrowExceptionForHR(_obj.Vftbl.GetReference_1(ThisPtr, out __retval));
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\IContextCallback.cs (1)
77Marshal.ThrowExceptionForHR(_obj.Vftbl.ContextCallback_4(ThisPtr, pfnCallback, pParam, ref riid, iMethod, IntPtr.Zero));
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (2)
54Marshal.ThrowExceptionForHR(Platform.WindowsCreateStringReference( 106Marshal.ThrowExceptionForHR(
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (1)
55Marshal.ThrowExceptionForHR(VftblIUnknown.QueryInterface(ThisPtr, ref iid, out IntPtr thatPtr));
ReachFramework (1)
PrintConfig\PTProvider.cs (1)
791Marshal.ThrowExceptionForHR((int)hResult);
System.Data.OleDb (3)
System\Data\ProviderBase\DbConnectionPool.cs (2)
1239Marshal.ThrowExceptionForHR(waitForMultipleObjectsExHR); 1272Marshal.ThrowExceptionForHR(releaseSemaphoreResult); // will only throw if (hresult < 0)
System\Data\ProviderBase\DbConnectionPoolIdentity.cs (1)
71Marshal.ThrowExceptionForHR(lastError); // will only throw if (hresult < 0)
System.Diagnostics.PerformanceCounter (1)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.ProcessWaitHandle.cs (1)
31Marshal.ThrowExceptionForHR(error);
System.Drawing.Common (4)
System\Drawing\Icon.cs (1)
893Marshal.ThrowExceptionForHR((int)result);
System\Drawing\SystemIcons.cs (3)
76Marshal.ThrowExceptionForHR((int)result); 102Marshal.ThrowExceptionForHR((int)result); 113Marshal.ThrowExceptionForHR((int)result);
System.Private.CoreLib (9)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (2)
1046Marshal.ThrowExceptionForHR(Marshal.QueryInterface(checkForIdentity, IID_IUnknown, out identity)); 1051Marshal.ThrowExceptionForHR(Marshal.QueryInterface(externalComObject, IID_IUnknown, out identity));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\IReferenceTracker.cs (5)
11Marshal.ThrowExceptionForHR((*(delegate* unmanaged<IntPtr, int>**)pThis)[3](pThis)); 29Marshal.ThrowExceptionForHR((*(delegate* unmanaged<IntPtr, IntPtr*, int>**)pThis)[6](pThis, ptr)); 34Marshal.ThrowExceptionForHR((*(delegate* unmanaged<IntPtr, int>**)pThis)[7](pThis)); 39Marshal.ThrowExceptionForHR((*(delegate* unmanaged<IntPtr, int>**)pThis)[8](pThis)); 44Marshal.ThrowExceptionForHR((*(delegate* unmanaged<IntPtr, int>**)pThis)[9](pThis));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
170Marshal.ThrowExceptionForHR(((delegate* unmanaged<IntPtr, IntPtr, int>)(*(*(void***)_typeUnion._unionTypes._record._recordInfo + 4 /* IRecordInfo.RecordClear slot */)))(_typeUnion._unionTypes._record._recordInfo, _typeUnion._unionTypes._record._record));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ReferenceTrackerHost.cs (1)
215Marshal.ThrowExceptionForHR((*(delegate* unmanaged<IntPtr, IntPtr, int>**)pThis)[6](pThis, referenceTrackerHost));
System.Runtime.InteropServices (3)
System\Runtime\InteropServices\Marshalling\ComObject.cs (3)
99Marshal.ThrowExceptionForHR(qiResult); 111Marshal.ThrowExceptionForHR(qiResult); 157Marshal.ThrowExceptionForHR(qiHResult);
System.Speech (1)
Recognition\RecognizerBase.cs (1)
907Marshal.ThrowExceptionForHR((int)errorCode);
System.Transactions.Local (1)
System\Transactions\DtcProxyShim\DtcProxyShimFactory.cs (1)
59private static unsafe void DtcGetTransactionManager(string? nodeName, out ITransactionDispenser localDispenser) => Marshal.ThrowExceptionForHR(DtcGetTransactionManagerExW(nodeName, null, Guids.IID_ITransactionDispenser_Guid, 0, null, out localDispenser));
System.Windows.Forms (1)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1320Marshal.ThrowExceptionForHR((int)hr);
UIAutomationClient (2)
MS\Internal\Automation\UiaCoreApi.cs (2)
1145Marshal.ThrowExceptionForHR(hr); 1204Marshal.ThrowExceptionForHR(hr);
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (1)
1233Marshal.ThrowExceptionForHR(hr);
UIAutomationTypes (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (1)
2609Marshal.ThrowExceptionForHR(hr);