109 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 (1)
Instance\RunningObjectTable.cs (1)
80Marshal.ThrowExceptionForHR(hr);
Microsoft.Build.Engine.UnitTests (3)
BackEnd\TargetUpToDateChecker_Tests.cs (3)
1036Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 1050Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 1058Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Microsoft.Build.Framework (1)
NativeMethods.cs (1)
1300Marshal.ThrowExceptionForHR(errorCode);
Microsoft.Build.Tasks.Core (3)
Move.cs (1)
265Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
NativeMethods.cs (2)
1370Marshal.ThrowExceptionForHR(hr); 1445Marshal.ThrowExceptionForHR(hr);
Microsoft.CodeAnalysis (3)
DiaSymReader\SymUnmanagedFactory.cs (3)
123Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 132Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); 146Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
RenameTracking\MockRefactorNotifyService.cs (2)
28Marshal.ThrowExceptionForHR(unchecked((int)0x80004004)); // E_ABORT 40Marshal.ThrowExceptionForHR(unchecked((int)0x80004004)); // E_ABORT
Microsoft.CodeAnalysis.Features (1)
EditAndContinue\EditAndContinueMethodDebugInfoReader.cs (1)
202Marshal.ThrowExceptionForHR(hr);
Microsoft.CodeAnalysis.Scripting (2)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
181Marshal.ThrowExceptionForHR(hr);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (1)
437Marshal.ThrowExceptionForHR(CreateAssemblyNameObject(out result, null, 0, IntPtr.Zero));
Microsoft.CodeAnalysis.UnitTests (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (1)
437Marshal.ThrowExceptionForHR(CreateAssemblyNameObject(out result, null, 0, IntPtr.Zero));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Interop\JobObjectInfo.cs (1)
318Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Windows\Interop\MemoryInfo.cs (1)
25Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
Microsoft.VisualStudio.LanguageServices (34)
CodeDefinitionWindow\VisualStudioCodeDefinitionWindowService.cs (1)
58Marshal.ThrowExceptionForHR(vsCodeDefView.SetContext(new Context(locations)));
DebuggerIntelliSense\AbstractDebuggerIntelliSenseContext.cs (4)
257Marshal.ThrowExceptionForHR(shellService.GetToolWindowEnum(out var windowEnum)); 258Marshal.ThrowExceptionForHR(textView.GetBuffer(out _)); 265Marshal.ThrowExceptionForHR(frame[0].GetGuidProperty((int)__VSFPROPID.VSFPROPID_GuidPersistenceSlot, out var toolWindowGuid)); 268Marshal.ThrowExceptionForHR(frame[0].QueryViewInterface(typeof(IVsTextView).GUID, out var frameTextView));
Implementation\AbstractEditorFactory.cs (1)
171Marshal.ThrowExceptionForHR(hresult);
Implementation\AbstractOleCommandTarget.cs (1)
65Marshal.ThrowExceptionForHR(returnValue);
Implementation\ContainedLanguageRefactorNotifyService.cs (1)
56Marshal.ThrowExceptionForHR(hresult);
Implementation\VsRefactorNotifyService.cs (2)
59Marshal.ThrowExceptionForHR(hresult); 95Marshal.ThrowExceptionForHR(hresult);
Interactive\VsResetInteractive.cs (2)
79Marshal.ThrowExceptionForHR(_monitorSelection.GetCurrentSelection( 107Marshal.ThrowExceptionForHR(
Interactive\VsUpdateSolutionEvents.cs (2)
28Marshal.ThrowExceptionForHR( 56Marshal.ThrowExceptionForHR(_buildManager.UnadviseUpdateSolutionEvents(_cookie));
LanguageService\AbstractLanguageService`2.IVsImmediateStatementCompletion2.cs (3)
58Marshal.ThrowExceptionForHR(textView.AddCommandFilter(filter, out var nextFilter)); 66Marshal.ThrowExceptionForHR(textView.RemoveCommandFilter(this.filters[textView])); 84Marshal.ThrowExceptionForHR(textView.GetBuffer(out var debuggerBuffer));
Preview\PreviewEngine.cs (4)
278Marshal.ThrowExceptionForHR(adapter.GetBuffer(out var lines)); 279Marshal.ThrowExceptionForHR(lines.GetLastLineIndex(out _, out var piLineIndex)); 280Marshal.ThrowExceptionForHR(lines.GetLengthOfLine(piLineIndex, out var piLineLength)); 286Marshal.ThrowExceptionForHR(lines.ReplaceLines(0, 0, piLineIndex, piLineLength, newTextPtr, newText.Length, changes));
ProjectSystem\FileChangeTracker.cs (1)
179Marshal.ThrowExceptionForHR(
ProjectSystem\InvisibleEditor.cs (4)
53Marshal.ThrowExceptionForHR(invisibleEditorManager.RegisterInvisibleEditor(filePath, vsProject, 0, null, out var invisibleEditorPtr)); 65Marshal.ThrowExceptionForHR(VsTextLines.GetUndoManager(out _manager)); 66Marshal.ThrowExceptionForHR(((IVsUndoState)_manager).IsEnabled(out var isEnabled)); 115Marshal.ThrowExceptionForHR(hr);
TaskList\ProjectExternalErrorReporter.cs (1)
166Marshal.ThrowExceptionForHR(containedDocument.BufferCoordinator.MapPrimaryToSecondarySpan(
Venus\ContainedDocument.cs (2)
220Marshal.ThrowExceptionForHR(BufferCoordinator.GetPrimaryBuffer(out var primaryTextLines)); 893Marshal.ThrowExceptionForHR(
Venus\ContainedLanguage.cs (2)
86Marshal.ThrowExceptionForHR(bufferCoordinator.GetSecondaryBuffer(out var secondaryTextLines)); 90Marshal.ThrowExceptionForHR(bufferCoordinator.GetPrimaryBuffer(out var primaryTextLines));
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (3)
52Marshal.ThrowExceptionForHR(_undoManager.OpenLinkedUndo((uint)LinkedTransactionFlags2.mdtGlobal, _description)); 107Marshal.ThrowExceptionForHR(result); 124Marshal.ThrowExceptionForHR(_undoManager.AbortLinkedUndo());
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (7)
MockVsFileChangeEx.vb (7)
149Marshal.ThrowExceptionForHR(AdviseFileChange(filename, CType(filter, UInteger), sink, cookie)) 159Marshal.ThrowExceptionForHR(AdviseFileChange(filename, CType(filter, UInteger), sink, cookie)) 172Marshal.ThrowExceptionForHR(UnadviseFileChange(cookie)) 185Marshal.ThrowExceptionForHR(UnadviseFileChange(cookie)) 196Marshal.ThrowExceptionForHR(AdviseDirChange(directory, If(watchSubdirectories, 1, 0), sink, cookie)) 204Marshal.ThrowExceptionForHR(UnadviseFileChange(cookie)) 217Marshal.ThrowExceptionForHR(UnadviseFileChange(cookie))
MSBuildTaskHost (1)
NativeMethods.cs (1)
1300Marshal.ThrowExceptionForHR(errorCode);
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\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)
794Marshal.ThrowExceptionForHR((int)hResult);
Roslyn.Test.PdbUtilities (1)
Reader\PdbTestUtilities.cs (1)
39Marshal.ThrowExceptionForHR(hr);
System.Private.CoreLib (1)
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));
System.Runtime.InteropServices (3)
System\Runtime\InteropServices\Marshalling\ComObject.cs (3)
99Marshal.ThrowExceptionForHR(qiResult); 111Marshal.ThrowExceptionForHR(qiResult); 157Marshal.ThrowExceptionForHR(qiHResult);
System.Windows.Forms (1)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1320Marshal.ThrowExceptionForHR((int)hr);
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataObjectTests.cs (1)
1928Marshal.ThrowExceptionForHR(QueryGetData(ref format));
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\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (1)
2609Marshal.ThrowExceptionForHR(hr);