165 instantiations of ComScope
System.Private.Windows.Core (21)
System\Private\Windows\Ole\ClipboardCore.cs (1)
142proxyDataObject = new(null);
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (2)
374using ComScope<Com.IStream> pStream = new((Com.IStream*)medium.hGlobal); 549using ComScope<Com.IEnumFORMATETC> enumFORMATETC = new(null);
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (2)
48using ComScope<Com.IEnumSTATDATA> nativeStatData = new(null); 57using ComScope<Com.IEnumFORMATETC> nativeFormat = new(null);
System\Private\Windows\Ole\DragDropHelper.cs (5)
61using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 76using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 91using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 107using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 253using ComScope<IDragSourceHelper2> dragSourceHelper = new(null);
Windows\Win32\System\Com\ComHelpers.cs (6)
29new(GetComPointer<T>(@object)); 41new(TryGetComPointer<T>(@object, out hr)); 248using ComScope<IUnknown> unknown = new(null); 257using ComScope<IUnknown> ccw = new((IUnknown*)(void*)Marshal.GetIUnknownForObject(@object)); 338using ComScope<ITypeLib> typelib = new(null); 342ComScope<ITypeInfo> typeInfo = new(null);
Windows\Win32\System\Com\ComScope.cs (4)
62ComScope<TTo> scope = new(null); 72ComScope<TTo> scope = new(null); 82ComScope<T> scope = new(null); 97ComScope<T> scope = new(null);
Windows\Win32\System\Com\GlobalInterfaceTable.cs (1)
55ComScope<TInterface> @interface = new(null);
System.Private.Windows.GdiPlus (5)
System\Drawing\IIconExtensions.cs (1)
43ComScope<IPicture> picture = new(null);
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (2)
54ComScope<IPictureDisp> picture = new(null); 69ComScope<IPicture> picture = new(null);
Windows\Win32\System\Ole\IPicture.cs (2)
22ComScope<IPicture> picture = new(null); 37ComScope<IPicture> picture = new(null);
System.Windows.Forms (59)
System\Windows\Forms\Accessibility\AccessibleObject.cs (2)
1834ComScope<IDispatch> child = new(null); 2241ComScope<IDispatch> dispatch = new(null);
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
668using ComScope<IOleClientSite> clientSite = new(null);
System\Windows\Forms\ActiveX\AxHost.cs (5)
2220using ComScope<IClassFactory2> factory = new(null); 2259using ComScope<IUnknown> unknown = new(null); 2275using ComScope<IClassFactory2> factory = new(null); 2286using ComScope<IUnknown> unknown = new(null); 3762using ComScope<IDispatch> dispatch = new((IDispatch*)Marshal.GetIDispatchForObject(oleFont));
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (3)
999using ComScope<IStream> stream = new(null); 1421using ComScope<IConnectionPoint> connectionPoint = new(null); 1460using ComScope<IStream> stream = new(null);
System\Windows\Forms\ActiveX\Control.AxSourcingSite.cs (1)
40using ComScope<IOleContainer> container = new(null);
System\Windows\Forms\Application.ComponentThreadContext.cs (3)
90using ComScope<ComIMessageFilter> messageFilter = new(null); 110using ComScope<IUnknown> serviceHandle = new(null); 243using ComScope<IMsoComponent> component = new(null);
System\Windows\Forms\ComponentModel\COM2Interop\COM2PictureConverter.cs (1)
120using ComScope<IPicture> picture = new(null);
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
878using ComScope<IErrorInfo> errorInfo = new(null);
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (1)
350using ComScope<ITypeInfo> refTypeInfo = new(null);
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (1)
83using ComScope<ITypeInfo> typeInfo = new(Com2TypeInfoProcessor.FindTypeInfo(component, preferIProvideClassInfo: true));
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (1)
38using ComScope<ILockBytes> pLockBytes = new(null);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (3)
1652using ComScope<IRichEditOle> richEdit = new(null); 1676using ComScope<ITextRange> windowTextRange = new(null); 1693using ComScope<ITextRange> selectionTextRange = new(null);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (3)
144using ComScope<IHTMLLocation> htmlLocation = new(null); 480using ComScope<IDispatch> dispatch = new(null); 505using ComScope<IDispatch> scriptDispatch = new(null);
System\Windows\Forms\Controls\WebBrowser\HtmlElement.cs (7)
64using ComScope<IDispatch> dispatch = new(null); 78using ComScope<IDispatch> dispatch = new(null); 121using ComScope<IDispatch> dispatch = new(null); 173using ComScope<IHTMLDOMNode> child = new(null); 289using ComScope<IHTMLDOMNode> sibling = new(null); 459using ComScope<IHTMLStyle> style = new(null); 468using ComScope<IHTMLStyle> style = new(null);
System\Windows\Forms\Controls\WebBrowser\HtmlElementCollection.cs (2)
57using ComScope<IDispatch> dispatch = new(null); 77using ComScope<IDispatch> dispatch = new(null);
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (6)
74using ComScope<IHTMLDocument2> htmlDoc2 = new(null); 148using ComScope<IDispatch> dispatch = new(variantDispatch.data.pdispVal); 188using ComScope<IHTMLDocument2> htmlDoc2 = new(null); 190using ComScope<IHTMLElement> bodyElement = new(null); 227using ComScope<IHTMLLocation> location = new(null); 246using ComScope<IHTMLFrameBase> htmlFrameBase = new(null);
System\Windows\Forms\Controls\WebBrowser\HtmlWindowCollection.cs (2)
42using ComScope<IDispatch> dispatch = new(variantDispatch.data.pdispVal); 61using ComScope<IDispatch> dispatch = new(variantDispatch.data.pdispVal);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (2)
220using ComScope<IDispatch> dispatch = new(null); 228using ComScope<IHTMLLocation> htmlLocation = new(null);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.Vista.cs (1)
64using ComScope<IShellItem> initialDirectory = new(PInvoke.SHCreateShellItem(InitialDirectory));
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (5)
345using ComScope<IFileDialogCustomize> customize = new(null); 357using ComScope<IShellItem> initialDirectory = new(PInvoke.SHCreateShellItem(_initialDirectory)); 406using ComScope<IShellItemArray> itemArray = new(null); 412using ComScope<IShellItem> item = new(null); 426using ComScope<IShellItem> item = new(null);
System\Windows\Forms\Dialogs\CommonDialogs\OpenFileDialog.cs (4)
139using ComScope<IShellItem> item = new(null); 146using ComScope<IShellItemArray> items = new(null); 158using ComScope<IShellItem> item = new(null); 175return new(fileDialog);
System\Windows\Forms\Dialogs\CommonDialogs\SaveFileDialog.cs (2)
159using ComScope<IShellItem> item = new(null); 173return new(fileDialog);
System\Windows\Forms\Input\Cursor.cs (2)
405using ComScope<IPicture> picture = new(null); 408using ComScope<IPersistStream> persist = new(null);
System.Windows.Forms.Design (1)
System\ComponentModel\Design\MultilineStringEditor.OleCallback.cs (1)
30using ComScope<ILockBytes> pLockBytes = new(null);
System.Windows.Forms.Interop.Tests (1)
AccessibleObjectTests.cs (1)
748using ComScope<ITypeInfo> typeInfo = new(null);
System.Windows.Forms.Primitives (4)
System\Windows\Forms\FileDialogCustomPlacesCollection.cs (1)
15using ComScope<IShellItem> shellItem = new(customPlace.GetNativePath());
Windows\Win32\System\Com\ComSafeArrayScope.cs (1)
54using ComScope<IUnknown> unknown = new((IUnknown*)_value[i]);
Windows\Win32\System\Com\StandardDispatch.cs (2)
130using ComScope<T> @interface = new(ComHelpers.GetComPointer<T>(_instance)); 187using ComScope<T> @interface = new(ComHelpers.GetComPointer<T>(_instance));
System.Windows.Forms.Primitives.Tests (35)
Interop\Oleaut32\ITypeInfoTests.cs (19)
21using ComScope<ITypeInfo> typeInfo = new(null); 35using ComScope<ITypeInfo> typeInfo = new(null); 49using ComScope<ITypeInfo> typeInfo = new(null); 52using ComScope<ITypeLib> typeLib = new(null); 65using ComScope<ITypeInfo> typeInfo = new(null); 85using ComScope<ITypeInfo> typeInfo = new(null); 105using ComScope<ITypeInfo> typeInfo = new(null); 139using ComScope<ITypeInfo> typeInfo = new(null); 163using ComScope<ITypeInfo> typeInfo = new(null); 177using ComScope<ITypeInfo> typeInfo = new(null); 191using ComScope<ITypeInfo> typeInfo = new(null); 213using ComScope<ITypeInfo> typeInfo = new(null); 220using ComScope<ITypeInfo> refTypeInfo = new(null); 230using ComScope<ITypeInfo> typeInfo = new(null); 244using ComScope<ITypeInfo> typeInfo = new(null); 283using ComScope<ITypeInfo> typeInfo = new(null); 286using ComScope<ITypeComp> typeComp = new(null); 296using ComScope<ITypeInfo> typeInfo = new(null); 325using ComScope<ITypeInfo> typeInfo = new(null);
Interop\Oleaut32\SAFEARRAYTests.cs (1)
94using ComScope<IRecordInfo> recordInfo = new(new CustomRecordInfo().GetComInterface());
Interop\Oleaut32\VARIANTTests.cs (6)
938using ComScope<IUnknown> unknown = new((IUnknown*)(void*)Marshal.GetIUnknownForObject(o)); 970using ComScope<IUnknown> unknown = new((IUnknown*)(void*)Marshal.GetIUnknownForObject(o)); 5616using ComScope<IRecordInfo> pRecordInfo = new(recordInfo.GetComInterface()); 5631using ComScope<IRecordInfo> pRecordInfo = new(recordInfo.GetComInterface()); 5656using ComScope<IRecordInfo> pRecordInfo = new(record.GetComInterface()); 5682using ComScope<IRecordInfo> pRecordInfo = new(record.GetComInterface());
System\Windows\Forms\Automation\UiaTextRangeTests.cs (6)
31using ComScope<IRawElementProviderSimple> elementProviderScope = new(null); 229using ComScope<ITextRangeProvider> rangeScope = new(null); 405using ComScope<ITextRangeProvider> actual = new(null); 432using ComScope<ITextRangeProvider> actual = new(null); 453using ComScope<ITextRangeProvider> actual = new(null); 844using ComScope<IRawElementProviderSimple> actual = new(null);
Windows\Win32\AgileComPointerTests.cs (1)
45using ComScope<IUnknown> originalUnknownPtr = new(null);
Windows\Win32\System\Com\ComScopeTests.cs (1)
14ComScope<ITestObject> scope = new(ComHelpers.GetComPointer<ITestObject>(new TestObject()));
Windows\Win32\System\Com\IDispatchTests.cs (1)
44using ComScope<ITypeInfo> typeInfo = new(null);
System.Windows.Forms.Tests (35)
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (3)
2745using ComScope<UIA.IAccessible> accessible = new(null); 2747using ComScope<UIA.IAccessible> expected = new(ComHelpers.TryGetComPointer<UIA.IAccessible>(accessibleObject)); 2759using ComScope<UIA.IAccessible> accessible = new(null);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
1465using ComScope<IRawElementProviderFragmentRoot> actual = new(null);
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
106using ComScope<IRawElementProviderSimple> elementProvider = new(accessibilityObject.HostRawElementProvider);
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (1)
105using ComScope<IRawElementProviderSimple> provider = new(accessibilityObject.HostRawElementProvider);
System\Windows\Forms\Application.ComponentManagerTests.cs (1)
336using ComScope<IMsoComponent> component = new(null);
System\Windows\Forms\ClipboardTests.cs (1)
468using ComScope<Com.IDataObject> proxy = new(null);
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (9)
163using ComScope<ITextRangeProvider> range = new(provider.DocumentRange); 164using ComScope<IRawElementProviderSimple> elementProvider = new(range.Value->GetEnclosingElement()); 211ComScope<ITextRangeProvider> uiaTextRange = new(null); 230using ComScope<ITextRangeProvider> uiaTextRange = new(null); 894using ComScope<ITextRangeProvider> range = new(null); 918using ComScope<ITextRangeProvider> range = new(null); 935using ComScope<ITextRangeProvider> range = new(null); 960using ComScope<ITextRangeProvider> range = new(selection[0]); 1023using ComScope<ITextRangeProvider> range = new(selection[0]);
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (2)
36using ComScope<IFont> iFont = new(null); 68using ComScope<IFont> iFont = new(null);
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (2)
113ComScope<IUnknown> unknown = new(null); 162using ComScope<IAccessible> accessible = new(null);
System\Windows\Forms\Control.ActiveXFontMarshallerTests.cs (1)
23using ComScope<IFont> iFont = new((IFont*)native);
System\Windows\Forms\HtmlDocumentTests.cs (1)
412using ComScope<IHTMLDOMNode> node = new(null);
System\Windows\Forms\HtmlElementTests.cs (2)
1288using ComScope<IHTMLStyle> htmlStyle = new(null); 1326using ComScope<IHTMLStyle> htmlStyle = new(null);
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (1)
81using ComScope<IRawElementProviderFragment> previousAccessibleObject = new(null);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (9)
119using ComScope<ITextRangeProvider> documentRange = new(provider.DocumentRange); 140using ComScope<ITextRangeProvider> uiaTextRange = new(null); 152using ComScope<ITextRangeProvider> uiaTextRange = new(null); 759using ComScope<ITextRangeProvider> range = new(null); 774using ComScope<ITextRangeProvider> range = new(null); 795using ComScope<ITextRangeProvider> range = new(null); 809using ComScope<ITextRangeProvider> range = new(null); 830using ComScope<ITextRangeProvider> range = new(selection[0]); 872using ComScope<ITextRangeProvider> range = new(selection[0]);
System.Windows.Forms.UI.IntegrationTests (4)
DragDropTests.cs (2)
135using ComScope<IUIAutomation> uiAutomation = new(null); 136using ComScope<IUIAutomationElement> uiAutomationElement = new(null);
RichTextBoxTests.cs (2)
213using ComScope<IRichEditOle> richEdit = new(null); 221using ComScope<ITextRange> range = new(null);
857 references to ComScope
ComDisabled.Tests (4)
Control.ActiveXImplTests.cs (1)
25using var istream = memoryStream.ToIStream();
DataObjectComTests.cs (3)
28using var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData); 48var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData); 66var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData);
System.Private.Windows.Core (84)
System\IO\StreamExtensions.cs (1)
15internal static ComScope<IStream> ToIStream(this Stream stream, bool makeSeekable = false)
System\Private\Windows\Ole\ClipboardCore.cs (5)
96using var iDataObject = ComHelpers.GetComScope<IDataObject>(dataObject); 135out ComScope<IDataObject> proxyDataObject, 166using ComScope<IComCallableWrapper> realDataObject = proxyDataObject.TryQuery<IComCallableWrapper>(out HRESULT wrapperResult); 196out ComScope<IDataObject> proxyDataObject, 221out ComScope<IDataObject> proxyDataObject,
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (14)
36using var nativeDataObject = _nativeDataObject.GetInterface(); 42using var nativeDataObject = _nativeDataObject.GetInterface(); 48using var nativeDataObject = _nativeDataObject.GetInterface(); 54using var nativeDataObject = _nativeDataObject.GetInterface(); 60using var nativeDataObject = _nativeDataObject.GetInterface(); 66using var nativeDataObject = _nativeDataObject.GetInterface(); 72using var nativeDataObject = _nativeDataObject.GetInterface(); 78using var nativeDataObject = _nativeDataObject.GetInterface(); 84using var nativeDataObject = _nativeDataObject.GetInterface(); 374using ComScope<Com.IStream> pStream = new((Com.IStream*)medium.hGlobal); 441using var nativeDataObject = _nativeDataObject.GetInterface(); 546using var nativeDataObject = _nativeDataObject.GetInterface(); 549using ComScope<Com.IEnumFORMATETC> enumFORMATETC = new(null); 644using var nativeDataObject = _nativeDataObject.GetInterface();
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (12)
31using var nativeAdviseSink = ComHelpers.TryGetComScope<Com.IAdviseSink>(adviseSink); 35using var nativeDataObject = _nativeDataObject.GetInterface(); 42using var nativeDataObject = _nativeDataObject.GetInterface(); 48using ComScope<Com.IEnumSTATDATA> nativeStatData = new(null); 49using var nativeDataObject = _nativeDataObject.GetInterface(); 57using ComScope<Com.IEnumFORMATETC> nativeFormat = new(null); 58using var nativeDataObject = _nativeDataObject.GetInterface(); 69using var nativeDataObject = _nativeDataObject.GetInterface(); 79using var nativeDataObject = _nativeDataObject.GetInterface(); 89using var nativeDataObject = _nativeDataObject.GetInterface(); 97using var nativeDataObject = _nativeDataObject.GetInterface(); 105using var nativeDataObject = _nativeDataObject.GetInterface();
System\Private\Windows\Ole\DragDropHelper.cs (8)
61using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 67using var dataObjectScope = ComHelpers.GetComScope<IDataObject>(dataObject); 76using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 91using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 107using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 114using var dataObjectScope = ComHelpers.GetComScope<IDataObject>(dataObject); 253using ComScope<IDragSourceHelper2> dragSourceHelper = new(null); 289using var dataObjectScope = ComHelpers.GetComScope<IDataObject>(dataObject);
Windows\Win32\PInvokeCore.RegisterDragDrop.cs (1)
14using var dropTarget = ComHelpers.TryGetComScope<IDropTarget>(pDropTarget, out HRESULT hr);
Windows\Win32\System\Com\AgileComPointer.cs (13)
106using var currentUnknown = GetInterface<IUnknown>(); 107using var otherUnknown = other.GetInterface<IUnknown>(); 114using var currentUnknown = GetInterface<IUnknown>(); 115using ComScope<IUnknown> otherUnknown = ComScope<IUnknown>.QueryFrom(other); 122public ComScope<TInterface> GetInterface() 124var scope = GlobalInterfaceTable.GetInterface<TInterface>(_cookie, out HRESULT hr); 132public ComScope<TAsInterface> GetInterface<TAsInterface>() 135var scope = TryGetInterface<TAsInterface>(out HRESULT hr); 143public ComScope<TInterface> TryGetInterface(out HRESULT hr) 149public ComScope<TAsInterface> TryGetInterface<TAsInterface>(out HRESULT hr) 152var scope = GlobalInterfaceTable.GetInterface<TAsInterface>(_cookie, out hr); 162using var scope = GetInterface();
Windows\Win32\System\Com\ComHelpers.cs (11)
28internal static ComScope<T> GetComScope<T>(object? @object) where T : unmanaged, IComIID => 34internal static ComScope<T> TryGetComScope<T>(object? @object) where T : unmanaged, IComIID => 40internal static ComScope<T> TryGetComScope<T>(object? @object, out HRESULT hr) where T : unmanaged, IComIID => 68using var scope = TryGetComScope<T>(@object, out HRESULT hr); 158ComScope<TInterface> comScope, 248using ComScope<IUnknown> unknown = new(null); 257using ComScope<IUnknown> ccw = new((IUnknown*)(void*)Marshal.GetIUnknownForObject(@object)); 282internal static object GetObjectForIUnknown<TInterface>(ComScope<TInterface> comScope) 323public static ComScope<ITypeInfo> GetRegisteredTypeInfo( 338using ComScope<ITypeLib> typelib = new(null); 342ComScope<ITypeInfo> typeInfo = new(null);
Windows\Win32\System\Com\ComScope.cs (17)
42public static implicit operator T*(in ComScope<T> scope) => (T*)scope._value; 44public static implicit operator void*(in ComScope<T> scope) => (void*)scope._value; 46public static implicit operator nint(in ComScope<T> scope) => scope._value; 49public static implicit operator T**(in ComScope<T> scope) => (T**)Unsafe.AsPointer(ref Unsafe.AsRef(in scope._value)); 52public static implicit operator void**(in ComScope<T> scope) => (void**)Unsafe.AsPointer(ref Unsafe.AsRef(in scope._value)); 57/// Tries querying the requested interface into a new <see cref="ComScope{T}"/>. 60public ComScope<TTo> TryQuery<TTo>(out HRESULT hr) where TTo : unmanaged, IComIID 62ComScope<TTo> scope = new(null); 68/// Queries the requested interface into a new <see cref="ComScope{T}"/>. 70public ComScope<TTo> Query<TTo>() where TTo : unmanaged, IComIID 72ComScope<TTo> scope = new(null); 78/// Attempt to create a <see cref="ComScope{T}"/> from the given COM interface. 80public static ComScope<T> TryQueryFrom<TFrom>(TFrom* from, out HRESULT hr) where TFrom : unmanaged, IComIID 82ComScope<T> scope = new(null); 88/// Create a <see cref="ComScope{T}"/> from the given COM interface. Throws on failure. 90public static ComScope<T> QueryFrom<TFrom>(TFrom* from) where TFrom : unmanaged, IComIID 97ComScope<T> scope = new(null);
Windows\Win32\System\Com\GlobalInterfaceTable.cs (2)
52public static ComScope<TInterface> GetInterface<TInterface>(uint cookie, out HRESULT result) 55ComScope<TInterface> @interface = new(null);
System.Private.Windows.Core.Tests (6)
System\Private\Windows\Ole\ClipboardCoreTests.cs (6)
54using ComScope<IDataObject> iDataObject = ComHelpers.GetComScope<IDataObject>(dataObject); 56using ComScope<IDataObject> fetched = agileComPointer.GetInterface(); 71result = ClipboardCore.TryGetData(out var data, out var original, retryTimes: 1, retryDelay: 0); 92result = ClipboardCore.TryGetData(out var data, out var original, retryTimes: 1, retryDelay: 0); 188HRESULT result = ClipboardCore.TryGetData(out var data, out var original, retryTimes: 1, retryDelay: 0); 197result = ClipboardCore.TryGetData(out var data1, out var original1, retryTimes: 1, retryDelay: 0);
System.Private.Windows.GdiPlus (16)
System\Drawing\CoreImageExtensions.cs (1)
27using var iStream = stream.ToIStream();
System\Drawing\IIconExtensions.cs (3)
36using ComScope<IPicture> picture = icon.CreateIPicture(copy); 40internal static ComScope<IPicture> CreateIPicture(this IIcon icon, bool copy) 43ComScope<IPicture> picture = new(null);
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (6)
47using ComScope<IPictureDisp> picture = image.CreateIPictureDisp(); 51public static ComScope<IPictureDisp> CreateIPictureDisp(this IPointer<GpImage> image) 54ComScope<IPictureDisp> picture = new(null); 62using ComScope<IPicture> picture = image.CreateIPicture(); 66public static ComScope<IPicture> CreateIPicture(this IPointer<GpImage> image) 69ComScope<IPicture> picture = new(null);
Windows\Win32\System\Ole\IPicture.cs (6)
15using ComScope<IPicture> picture = CreateFromImage(image); 19public static ComScope<IPicture> CreateFromImage(IPointer<GpImage> image) 22ComScope<IPicture> picture = new(null); 30using ComScope<IPicture> picture = CreateFromIcon(icon, copy); 34public static ComScope<IPicture> CreateFromIcon(IIcon icon, bool copy) 37ComScope<IPicture> picture = new(null);
System.Windows.Forms (459)
System\Windows\Forms\Accessibility\AccessibleObject.cs (24)
297using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 449using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 517using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 555using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 1286using var selection = ComHelpers.GetComScope<IRawElementProviderSimple>(selected); 1594using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 1668using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 1720using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 1772using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 1808using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 1823using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 1834ComScope<IDispatch> child = new(null); 1874using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 1918using ComScope<UIA.IAccessible> accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 2241ComScope<IDispatch> dispatch = new(null); 2345using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 2540using var oleWindow = TryGetOleWindow(out HRESULT result); 2565using var oleWindow = TryGetOleWindow(out HRESULT result); 2626using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 2648using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result); 3237using var provider = ComHelpers.GetComScope<IRawElementProviderSimple>(this); 3249using var provider = ComHelpers.GetComScope<IRawElementProviderSimple>(this); 3269using var provider = ComHelpers.GetComScope<IRawElementProviderSimple>(this); 3298private ComScope<IOleWindow> TryGetOleWindow(out HRESULT result)
System\Windows\Forms\Accessibility\AccessibleObject.EnumVariantObject.cs (5)
47using ComScope<IEnumVARIANT> enumVariant = TryGetSystemEnumVARIANT(out HRESULT result); 63using ComScope<IEnumVARIANT> enumVariant = TryGetSystemEnumVARIANT(out HRESULT result); 128using ComScope<IEnumVARIANT> enumVariant = TryGetSystemEnumVARIANT(out HRESULT result); 160using ComScope<IEnumVARIANT> enumVariant = TryGetSystemEnumVARIANT(out HRESULT result); 210private ComScope<IEnumVARIANT> TryGetSystemEnumVARIANT(out HRESULT result)
System\Windows\Forms\Accessibility\AccessibleObjectExtensions.cs (16)
12public static ComScope<IAccessible> TryGetIAccessible(this AgileComPointer<IAccessible>? agile, out HRESULT result) 29using var accessible = agile.TryGetIAccessible(out HRESULT result); 53using var accessible = agile.TryGetIAccessible(out HRESULT result); 73using var accessible = agile.TryGetIAccessible(out HRESULT result); 87using var accessible = agile.TryGetIAccessible(out HRESULT result); 107using var accessible = agile.TryGetIAccessible(out HRESULT result); 127using var accessible = agile.TryGetIAccessible(out HRESULT result); 147using var accessible = agile.TryGetIAccessible(out HRESULT result); 170using var accessible = agile.TryGetIAccessible(out HRESULT result); 186using var accessible = agile.TryGetIAccessible(out HRESULT result); 205using var accessible = agile.TryGetIAccessible(out HRESULT result); 223using var accessible = agile.TryGetIAccessible(out HRESULT result); 240using var accessible = agile.TryGetIAccessible(out HRESULT result); 260using var accessible = agile.TryGetIAccessible(out HRESULT result); 280using var accessible = agile.TryGetIAccessible(out HRESULT result); 291using var accessible = agile.TryGetIAccessible(out HRESULT result);
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
167using var selection = ComHelpers.GetComScope<ITextRangeProvider>(new UiaTextRange(_owningChildEditAccessibilityObject, this, start, end)); 215using var ranges = ComHelpers.GetComScope<ITextRangeProvider>(new UiaTextRange(_owningChildEditAccessibilityObject, this, start, end));
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (4)
488using var inPlaceObject = tempSite.GetComScope<IOleInPlaceObject>(); 661using var oleObject = ComScope<IOleObject>.TryQueryFrom(pActiveObject, out HRESULT hr); 668using ComScope<IOleClientSite> clientSite = new(null);
System\Windows\Forms\ActiveX\AxHost.AxPerPropertyBrowsingEnum.cs (1)
90using var propertyBrowsing = _owner.GetComScope<IPerPropertyBrowsing>();
System\Windows\Forms\ActiveX\AxHost.AxPropertyDescriptor.cs (2)
134using var propertyBrowsing = _owner.TryGetComScope<IPerPropertyBrowsing>(out HRESULT hr); 288using var propertyBrowsing = _owner.TryGetComScope<IPerPropertyBrowsing>(out HRESULT hr);
System\Windows\Forms\ActiveX\AxHost.ConnectionPointCookie.cs (1)
121using var connectionPoint = TryGetInterface(out HRESULT hr);
System\Windows\Forms\ActiveX\AxHost.cs (53)
242using var oleObject = GetComScope<IOleObject>(); 810using var oleControl = GetComScope<IOleControl>(); 1126using var oleObject = GetComScope<IOleObject>(); 1145using var oleObject = GetComScope<IOleObject>(); 1166using var inPlaceObject = GetComScope<IOleInPlaceObject>(); 1479using var inPlaceObject = GetComScope<IOleInPlaceObject>(); 1690using var activeObject = _iOleInPlaceActiveObjectExternal is { } external 1748using var oleControl = GetComScope<IOleControl>(); 1880using (var stream = ms.ToIStream()) 1884using var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance); 1889using var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(_instance); 1902using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance); 1909using (var propertyBag = ComHelpers.GetComScope<IPropertyBag>(propBag)) 1910using (var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(_instance)) 2034using (var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance)) 2041using (var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(_instance)) 2048using (var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance)) 2151using var pClientSite = ComHelpers.TryGetComScope<IOleClientSite>(_oleSite, out HRESULT hr); 2153using var oleObject = GetComScope<IOleObject>(); 2167using var oleControl = GetComScope<IOleControl>(); 2189using var inPlaceObject = GetComScope<IOleInPlaceObject>(); 2220using ComScope<IClassFactory2> factory = new(null); 2259using ComScope<IUnknown> unknown = new(null); 2275using ComScope<IClassFactory2> factory = new(null); 2286using ComScope<IUnknown> unknown = new(null); 2343using var categorizeProperties = ComHelpers.TryGetComScope<ICategorizeProperties>(_instance, out HRESULT hr); 2745using var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(_instance, out HRESULT hr); 2759using var persistStoragePtr = ComHelpers.TryGetComScope<IPersistStorage>(_instance, out hr); 2764using var storage = _ocxState.GetStorage(); 2769using var persistPropBag = ComHelpers.TryGetComScope<IPersistPropertyBag>(_instance, out hr); 2785using (var stream = _ocxState.GetStream()) 2788using var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance); 2794using (var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(_instance, out HRESULT hr)) 2798using (var stream = _ocxState.GetStream()) 2816using (var storage = _ocxState.GetStorage()) 2824using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance); 2831using (var propBag = _ocxState.GetPropBag()) 2837using var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(_instance); 2925using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 2936using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 2959using ComScope<IUnknown> unknown = ComHelpers.TryGetComScope<IUnknown>(_instance, out HRESULT hr); 3012using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 3027using var unknown = ComHelpers.GetComScope<IUnknown>(_instance); 3138using var inPlaceObject = GetComScope<IOleInPlaceObject>(); 3419using var oleObject = GetComScope<IOleObject>(); 3469using var oleObject = GetComScope<IOleObject>(); 3473using var clientSite = ComHelpers.GetComScope<IOleClientSite>(_oleSite); 3482using var clientSite = ComHelpers.GetComScope<IOleClientSite>(_oleSite); 3519private ComScope<T> GetComScope<T>() where T : unmanaged, IComIID 3522private ComScope<T> TryGetComScope<T>(out HRESULT hr) where T : unmanaged, IComIID 3557using var iPicture = ComHelpers.TryGetComScope<IPictureDisp>(picture, out HRESULT hr); 3581using var pictureDisp = ComHelpers.TryGetComScope<IPictureDisp>(picture, out HRESULT hr); 3762using ComScope<IDispatch> dispatch = new((IDispatch*)Marshal.GetIDispatchForObject(oleFont));
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (3)
306using var inPlaceObject = _host.GetComScope<IOleInPlaceObject>(); 438using var inPlaceObject = _host.GetComScope<IOleInPlaceObject>(); 461using var inPlaceObject = _host.GetComScope<IOleInPlaceObject>();
System\Windows\Forms\ActiveX\AxHost.State.cs (5)
188internal ComScope<IPropertyBag> GetPropBag() 191internal unsafe ComScope<IStorage> GetStorage() 201internal ComScope<IStream> GetStream() 264using var storage = _storage.GetInterface(); 272using var lockBytes = _lockBytes.GetInterface();
System\Windows\Forms\ActiveX\Control.ActiveXFontMarshaler.cs (2)
60using var nativeFont = ComScope<IFont>.TryQueryFrom((IUnknown*)pObj, out HRESULT hr);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (30)
211using var font = ComScope<IFont>.TryQueryFrom(value.data.punkVal, out HRESULT hr); 306using var adviseHolder = _adviseHolder.GetInterface(); 323using var clientSite = _clientSite.GetInterface(); 592using var dispatch = _clientSite.TryGetInterface<IDispatch>(out HRESULT hr); 609internal ComScope<IOleClientSite> GetClientSite() => _clientSite is null ? default : _clientSite.GetInterface(); 790using var inPlaceSite = _clientSite.TryGetInterface<IOleInPlaceSite>(out HRESULT hr); 863using var clientSite = _clientSite.GetInterface(); 896using var activeObject = ComHelpers.GetComScope<IOleInPlaceActiveObject>(_control); 898using var inPlaceFrame = _inPlaceFrame.GetInterface(); 900using var inPlaceUiWindow = _inPlaceUiWindow is null ? default : _inPlaceUiWindow.GetInterface(); 952using var inPlaceSite = _clientSite.TryGetInterface<IOleInPlaceSite>(out HRESULT hr); 999using ComScope<IStream> stream = new(null); 1032using var propertyBag = ComHelpers.GetComScope<IPropertyBag>(bagStream); 1316using var inPlaceFrame = _inPlaceFrame.GetInterface(); 1332using var controlSite = _clientSite.TryGetInterface<IOleControlSite>(out HRESULT hr); 1417using var container = ComHelpers.TryGetComScope<IConnectionPointContainer>(_control, out HRESULT hr); 1421using ComScope<IConnectionPoint> connectionPoint = new(null); 1460using ComScope<IStream> stream = new(null); 1485using var propertyBag = ComHelpers.GetComScope<IPropertyBag>(bagStream); 1595using var holder = _adviseHolder.GetInterface(); 1698using var clientSite = _clientSite.TryGetInterface<IOleInPlaceSite>(out HRESULT hr); 1732using var clientSite = _clientSite.GetInterface(); 1903using var controlSite = _clientSite.TryGetInterface<IOleControlSite>(out HRESULT hr); 1942using var window = _inPlaceUiWindow.GetInterface(); 1951using var frame = _inPlaceFrame.GetInterface(); 1957using var inPlaceSite = _clientSite.TryGetInterface<IOleInPlaceSite>(out HRESULT hr); 1975using var holder = _adviseHolder.GetInterface(); 1989using var inPlaceSite = _clientSite.TryGetInterface<IOleInPlaceSite>(out HRESULT hr); 2059using var controlSite = _clientSite.TryGetInterface<IOleControlSite>(out HRESULT hr);
System\Windows\Forms\ActiveX\Control.AxSourcingSite.cs (3)
39using var clientSite = _clientSite.GetInterface(); 40using ComScope<IOleContainer> container = new(null); 42using var document = container.TryQuery<IHTMLDocument>(out HRESULT hr);
System\Windows\Forms\Application.ComponentManager.cs (4)
166using var component = entry.component.GetInterface(); 186using var component = entry.component.GetInterface(); 229using var component = (_trackingComponent ?? _activeComponent ?? requestingComponent).GetInterface(); 278using var idleComponent = idleEntry.component.GetInterface();
System\Windows\Forms\Application.ComponentThreadContext.cs (5)
90using ComScope<ComIMessageFilter> messageFilter = new(null); 103using var serviceProvider = messageFilter.TryQuery<ComIServiceProvider>(out HRESULT hr); 110using ComScope<IUnknown> serviceHandle = new(null); 120var componentManager = serviceHandle.TryQuery<IMsoComponentManager>(out hr); 243using ComScope<IMsoComponent> component = new(null);
System\Windows\Forms\ComponentModel\COM2Interop\Com2AboutBoxPropertyDescriptor.AboutBoxUITypeEditor.cs (1)
19using var dispatch = ComHelpers.TryGetComScope<IDispatch>(context.Instance, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (6)
16using var propertyBrowsing = ComHelpers.TryGetComScope<IPerPropertyBrowsing>(comObject, out HRESULT hr); 28using var propertyPages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(comObject, out hr); 54using var propertyBrowsing = ComHelpers.TryGetComScope<IPerPropertyBrowsing>(obj, out HRESULT hr); 62using var unknown = ComHelpers.GetComScope<IUnknown>(obj); 84using var propertyPages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(obj, out hr); 96using var unknown = ComHelpers.GetComScope<IUnknown>(obj);
System\Windows\Forms\ComponentModel\COM2Interop\COM2ExtendedBrowsingHandler.cs (1)
15public static ComScope<T> TryGetComScope(object? @object, out HRESULT hr)
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (4)
31using var iFont = ComScope<IFont>.TryQueryFrom((IUnknown*)nativeValue, out HRESULT hr); 86using var font = ComScope<IFont>.TryQueryFrom((IUnknown*)nativeValue, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2ICategorizePropertiesHandler.cs (1)
16using var categorizeProperties = TryGetComScope(@object, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2IDispatchConverter.cs (1)
46using var dispatch = ComHelpers.TryGetComScope<IDispatch>(value, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (1)
36using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\Com2IPerPropertyBrowsingHandler.Com2IPerPropertyBrowsingEnum.cs (2)
64using var ppb = ComHelpers.TryGetComScope<IPerPropertyBrowsing>(Target.TargetObject, out HRESULT hr); 169using var propertyBrowsing = ComHelpers.TryGetComScope<IPerPropertyBrowsing>(Target.TargetObject, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\Com2IPerPropertyBrowsingHandler.Com2IPerPropertyEnumConverter.cs (1)
29using var propertyBrowsing = ComHelpers.TryGetComScope<IPerPropertyBrowsing>(
System\Windows\Forms\ComponentModel\COM2Interop\COM2IPerPropertyBrowsingHandler.cs (3)
61using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 77using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 98using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2IProvidePropertyBuilderHandler.cs (2)
54using var propertyBuilder = TryGetComScope(sender.TargetObject, out HRESULT hr); 73using var propertyBuilder = TryGetComScope(sender.TargetObject, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2IVsPerPropertyBrowsingHandler.cs (9)
18using var browsing = TryGetComScope(property.TargetObject, out HRESULT hr); 56using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 73using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 110using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 127using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 145using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 163using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 184using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr); 202using var propertyBrowsing = TryGetComScope(sender.TargetObject, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2PictureConverter.cs (3)
41using var picture = ComScope<IPicture>.TryQueryFrom((IUnknown*)nativeValue, out HRESULT hr); 120using ComScope<IPicture> picture = new(null);
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (1)
49using var propertyBuilder = ComHelpers.TryGetComScope<IProvidePropertyBuilder>(target, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (5)
212using var dispatch = ComHelpers.TryGetComScope<IDispatch>(TargetObject, out HRESULT hr); 613using var dispatch = ComHelpers.TryGetComScope<IDispatch>(component, out HRESULT hr); 832using var dispatch = ComHelpers.TryGetComScope<IDispatch>(owner, out HRESULT hr); 873using var iSupportErrorInfo = dispatch.TryQuery<ISupportErrorInfo>(out hr); 878using ComScope<IErrorInfo> errorInfo = new(null);
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (5)
71using var provideClassInfo = ComHelpers.TryGetComScope<IProvideClassInfo>(comObject, out HRESULT hr); 80using var dispatch = ComHelpers.TryGetComScope<IDispatch>(comObject, out HRESULT hr); 98using var classInfo = ComHelpers.TryGetComScope<IProvideMultipleClassInfo>(comObject, out HRESULT hr); 255using var dispatch = ComHelpers.GetComScope<IDispatch>(comObject); 350using ComScope<ITypeInfo> refTypeInfo = new(null);
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.ComTypeDescriptor.cs (1)
33using var dispatch = ComHelpers.TryGetComScope<IDispatch>(_instance, out HRESULT hr);
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (5)
59using var dispatch = ComHelpers.TryGetComScope<IDispatch>(component, out HRESULT hr); 73using var propertyBrowsing = ComHelpers.TryGetComScope<IVsPerPropertyBrowsing>(component, out HRESULT hr); 83using ComScope<ITypeInfo> typeInfo = new(Com2TypeInfoProcessor.FindTypeInfo(component, preferIProvideClassInfo: true)); 172using var dispatch = ComHelpers.TryGetComScope<IDispatch>(@object, out HRESULT hr); 244using var browsing = ComHelpers.TryGetComScope<IVSMDPerPropertyBrowsing>(component, out HRESULT hr);
System\Windows\Forms\Control.cs (2)
4948using var dropSource = ComHelpers.GetComScope<IDropSource>( 4950using var dataScope = ComHelpers.GetComScope<Com.IDataObject>(dataObject);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (1)
43using var accessible = SystemIAccessible.TryGetIAccessible(out HRESULT result);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
228using var selection = ComHelpers.GetComScope<ITextRangeProvider>(new UiaTextRange(_owningComboBox.ChildEditAccessibleObject, this, start, end)); 282using var ranges = ComHelpers.GetComScope<ITextRangeProvider>(new UiaTextRange(_owningComboBox.ChildEditAccessibleObject, this, start, end));
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (1)
26using var stream = ComHelpers.TryGetComScope<IStream>(pstm, out HRESULT hr);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
3110using var oleCallback = ComHelpers.GetComScope<IRichEditOleCallback>(_oleCallback);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (1)
38using ComScope<ILockBytes> pLockBytes = new(null);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (4)
1652using ComScope<IRichEditOle> richEdit = new(null); 1660using var textDocument = richEdit.TryQuery<ITextDocument>(out HRESULT hr); 1676using ComScope<ITextRange> windowTextRange = new(null); 1693using ComScope<ITextRange> selectionTextRange = new(null);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
49using var selection = ComHelpers.GetComScope<ITextRangeProvider>(new UiaTextRange(Owner.AccessibilityObject, this, start, end)); 73using var ranges = ComHelpers.GetComScope<ITextRangeProvider>(new UiaTextRange(Owner.AccessibilityObject, this, start, end));
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2193using var dropSource = ComHelpers.GetComScope<IDropSource>(CreateDropSource(dataObject, dragImage, cursorOffset, useDefaultDragImage)); 2194using var dataObjectScope = ComHelpers.GetComScope<Com.IDataObject>(dataObject);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (47)
39using var scope = _htmlDocument2.GetInterface<IUnknown>(); 50private ComScope<T> GetHtmlDocument<T>() where T : unmanaged, IComIID 52using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 53var scope = htmlDoc2.TryQuery<T>(out HRESULT hr); 79using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 90using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 101using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 110using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 126using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 133using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 143using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 144using ComScope<IHTMLLocation> htmlLocation = new(null); 162using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 175using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 187using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 200using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 212using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 225using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 237using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 250using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 262using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 275using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 287using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 298using var htmlDoc4 = GetHtmlDocument<IHTMLDocument4>(); 311using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 318using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 328using var htmlDoc3 = GetHtmlDocument<IHTMLDocument3>(); 335using var htmlDoc3 = GetHtmlDocument<IHTMLDocument3>(); 345using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 352using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 362using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 373using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 384using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 395using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 406using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 423using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 432using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 442using var htmlDoc4 = GetHtmlDocument<IHTMLDocument4>(); 450using var htmlDoc3 = GetHtmlDocument<IHTMLDocument3>(); 459using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 467using var htmlDoc3 = GetHtmlDocument<IHTMLDocument3>(); 479using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 480using ComScope<IDispatch> dispatch = new(null); 487using var htmlDoc = dispatch.TryQuery<IHTMLDocument>(out HRESULT hr); 493using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 504using var htmlDoc2 = NativeHtmlDocument2.GetInterface(); 505using ComScope<IDispatch> scriptDispatch = new(null);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.HtmlDocumentShim.cs (4)
55using var htmlDoc3 = _htmlDocument.GetHtmlDocument<IHTMLDocument3>(); 57using var dispatch = ComHelpers.GetComScope<IDispatch>(proxy); 88using var htmlDoc3 = _htmlDocument.GetHtmlDocument<IHTMLDocument3>(); 90using var dispatch = ComHelpers.GetComScope<IDispatch>(proxy);
System\Windows\Forms\Controls\WebBrowser\HtmlElement.cs (58)
53using var scope = _htmlElement.GetInterface<IUnknown>(); 63using var htmlElement = NativeHtmlElement.GetInterface(); 64using ComScope<IDispatch> dispatch = new(null); 77using var htmlElement = NativeHtmlElement.GetInterface(); 78using ComScope<IDispatch> dispatch = new(null); 91using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 102using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 120using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 121using ComScope<IDispatch> dispatch = new(null); 128using var htmlDocument = dispatch.TryQuery<IHTMLDocument>(out HRESULT hr); 137using var htmlElement3 = GetHtmlElement<IHTMLElement3>(); 144using var htmlElement3 = GetHtmlElement<IHTMLElement3>(); 169using var htmlElement = NativeHtmlElement.GetInterface(); 170using var node = htmlElement.TryQuery<IHTMLDOMNode>(out HRESULT hr); 173using ComScope<IHTMLDOMNode> child = new(null); 190using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 197using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 207using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 216using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 236using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 245using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 272private ComScope<T> GetHtmlElement<T>() where T : unmanaged, IComIID 274using var htmlElement = NativeHtmlElement.GetInterface(); 275var scope = htmlElement.TryQuery<T>(out HRESULT hr); 285using var htmlElement = NativeHtmlElement.GetInterface(); 286using var node = htmlElement.TryQuery<IHTMLDOMNode>(out HRESULT hr); 289using ComScope<IHTMLDOMNode> sibling = new(null); 306using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 325using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 336using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 345using var nativeHtmlElement = NativeHtmlElement.GetInterface(); 365using var htmlElement = NativeHtmlElement.GetInterface(); 374using var htmlElement = NativeHtmlElement.GetInterface(); 394using var htmlElement = NativeHtmlElement.GetInterface(); 405using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 424using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 431using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 440using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 447using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 458using var htmlElement = NativeHtmlElement.GetInterface(); 459using ComScope<IHTMLStyle> style = new(null); 467using var htmlElement = NativeHtmlElement.GetInterface(); 468using ComScope<IHTMLStyle> style = new(null); 479using var htmlElement = NativeHtmlElement.GetInterface(); 490using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 497using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 523using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 539using var htmlElement = NativeHtmlElement.GetInterface(); 550using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 559using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 561using var htmlElement = NativeHtmlElement.GetInterface(); 562using var insertedElement = ComHelpers.GetComScope<IHTMLElement>(newElement.DomElement); 574using var htmlElement = NativeHtmlElement.GetInterface(); 575using var scriptDispatch = htmlElement.TryQuery<IDispatch>(out HRESULT hr); 638using var htmlElement2 = GetHtmlElement<IHTMLElement2>(); 644using var htmlElement3 = GetHtmlElement<IHTMLElement3>(); 653using var htmlElement = NativeHtmlElement.GetInterface(); 662using var htmlElement = NativeHtmlElement.GetInterface();
System\Windows\Forms\Controls\WebBrowser\HtmlElement.HtmlElementShim.cs (4)
80using var htmlElement2 = _htmlElement.GetHtmlElement<IHTMLElement2>(); 82using var dispatch = ComHelpers.GetComScope<IDispatch>(proxy); 112using var htmlElement2 = _htmlElement.GetHtmlElement<IHTMLElement2>(); 114using var dispatch = ComHelpers.GetComScope<IDispatch>(proxy);
System\Windows\Forms\Controls\WebBrowser\HtmlElementCollection.cs (5)
56using var htmlElementCollection = NativeHtmlElementCollection.GetInterface(); 57using ComScope<IDispatch> dispatch = new(null); 75using var nativeHtmlElementCollection = NativeHtmlElementCollection.GetInterface(); 77using ComScope<IDispatch> dispatch = new(null); 146using var nativeHtmlElementCollection = NativeHtmlElementCollection.GetInterface();
System\Windows\Forms\Controls\WebBrowser\HtmlHistory.cs (5)
40using var omHistory = NativeOmHistory.GetInterface(); 52using var omHistory = NativeOmHistory.GetInterface(); 64using var omHistory = NativeOmHistory.GetInterface(); 86using var omHistory = NativeOmHistory.GetInterface(); 96using var omHistory = NativeOmHistory.GetInterface();
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (41)
33using var scope = _htmlWindow2.GetInterface<IUnknown>(); 44private ComScope<T> GetHtmlWindow<T>() where T : unmanaged, IComIID 46using var htmlWindow2 = NativeHtmlWindow.GetInterface(); 47var scope = htmlWindow2.TryQuery<T>(out HRESULT hr); 73using var htmlWindow = NativeHtmlWindow.GetInterface(); 74using ComScope<IHTMLDocument2> htmlDoc2 = new(null); 81using var htmlDoc = htmlDoc2.TryQuery<IHTMLDocument>(out HRESULT hr); 92using var htmlWindow = NativeHtmlWindow.GetInterface(); 103using var htmlWindow = NativeHtmlWindow.GetInterface(); 114using var htmlWindow = NativeHtmlWindow.GetInterface(); 128using var htmlWindow = NativeHtmlWindow.GetInterface(); 135using var htmlWindow = NativeHtmlWindow.GetInterface(); 145using var htmlWindow = NativeHtmlWindow.GetInterface(); 148using ComScope<IDispatch> dispatch = new(variantDispatch.data.pdispVal); 160using var htmlWindow = NativeHtmlWindow.GetInterface(); 171using var htmlWindow3 = GetHtmlWindow<IHTMLWindow3>(); 187using var htmlWindow = NativeHtmlWindow.GetInterface(); 188using ComScope<IHTMLDocument2> htmlDoc2 = new(null); 190using ComScope<IHTMLElement> bodyElement = new(null); 209using var htmlWindow = NativeHtmlWindow.GetInterface(); 216using var htmlWindow = NativeHtmlWindow.GetInterface(); 226using var htmlWindow = NativeHtmlWindow.GetInterface(); 227using ComScope<IHTMLLocation> location = new(null); 245using var htmlWindow4 = GetHtmlWindow<IHTMLWindow4>(); 246using ComScope<IHTMLFrameBase> htmlFrameBase = new(null); 257using var htmlWindow = NativeHtmlWindow.GetInterface(); 267using var htmlWindow = NativeHtmlWindow.GetInterface(); 273using var htmlWindow = NativeHtmlWindow.GetInterface(); 285using var htmlWindow = NativeHtmlWindow.GetInterface(); 294using var htmlWindow = NativeHtmlWindow.GetInterface(); 303using var htmlWindow = NativeHtmlWindow.GetInterface(); 309using var htmlWindow = NativeHtmlWindow.GetInterface(); 320using var htmlWindow = NativeHtmlWindow.GetInterface(); 331using var htmlWindow = NativeHtmlWindow.GetInterface(); 349using var htmlWindow = NativeHtmlWindow.GetInterface(); 363using var htmlWindow = NativeHtmlWindow.GetInterface(); 373using var htmlWindow = NativeHtmlWindow.GetInterface(); 382using var htmlWindow = NativeHtmlWindow.GetInterface(); 391using var htmlWindow = NativeHtmlWindow.GetInterface(); 400using var htmlWindow = NativeHtmlWindow.GetInterface(); 409using var htmlWindow = NativeHtmlWindow.GetInterface();
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.HtmlWindowShim.cs (4)
47using var htmlWindow3 = _htmlWindow.GetHtmlWindow<IHTMLWindow3>(); 49using var dispatch = ComHelpers.GetComScope<IDispatch>(proxy); 78using var htmlWindow3 = _htmlWindow.GetHtmlWindow<IHTMLWindow3>(); 80using var dispatch = ComHelpers.GetComScope<IDispatch>(proxy);
System\Windows\Forms\Controls\WebBrowser\HtmlWindowCollection.cs (5)
39using var htmlFrames2 = NativeHTMLFramesCollection2.GetInterface(); 42using ComScope<IDispatch> dispatch = new(variantDispatch.data.pdispVal); 58using var htmlFrameCollection2 = _htmlFramesCollection2.GetInterface(); 61using ComScope<IDispatch> dispatch = new(variantDispatch.data.pdispVal); 86using var htmlFrames2 = NativeHTMLFramesCollection2.GetInterface();
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (32)
98using var webBrowser2 = AxIWebBrowser2.GetInterface(); 109using var webBrowser2 = AxIWebBrowser2.GetInterface(); 127using var webBrowser2 = AxIWebBrowser2.GetInterface(); 136using var webBrowser2 = AxIWebBrowser2.GetInterface(); 219using var webBrowser2 = AxIWebBrowser2.GetInterface(); 220using ComScope<IDispatch> dispatch = new(null); 224using var iHTMLDocument2 = dispatch.TryQuery<IHTMLDocument2>(out HRESULT hr); 228using ComScope<IHTMLLocation> htmlLocation = new(null); 238using var htmlDoc = dispatch.TryQuery<IHTMLDocument>(out hr); 276using var pStream = memoryStream.ToIStream(); 348using var webBrowser2 = AxIWebBrowser2.GetInterface(); 355using var htmlDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(htmlDocument.DomDocument); 380using var htmlDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(htmlDocument.DomDocument); 424using var webBrowser2 = AxIWebBrowser2.GetInterface(); 441using var webBrowser2 = AxIWebBrowser2.GetInterface(); 524using var webBrowser2 = AxIWebBrowser2.GetInterface(); 567using var webBrowser2 = AxIWebBrowser2.GetInterface(); 633using var webBrowser2 = AxIWebBrowser2.GetInterface(); 655using var webBrowser2 = AxIWebBrowser2.GetInterface(); 671using var webBrowser2 = AxIWebBrowser2.GetInterface(); 680using var webBrowser2 = AxIWebBrowser2.GetInterface(); 815using var webBrowser2 = AxIWebBrowser2.GetInterface(); 830using var webBrowser2 = AxIWebBrowser2.GetInterface(); 857using var webBrowser2 = AxIWebBrowser2.GetInterface(); 904using var webBrowser2 = AxIWebBrowser2.GetInterface(); 920using var webBrowser2 = AxIWebBrowser2.GetInterface(); 935using var webBrowser2 = AxIWebBrowser2.GetInterface(); 951using var webBrowser2 = AxIWebBrowser2.GetInterface(); 967using var webBrowser2 = AxIWebBrowser2.GetInterface(); 982using var webBrowser2 = AxIWebBrowser2.GetInterface(); 1199using var webBrowser2 = AxIWebBrowser2.GetInterface(); 1317using var webBrowser2 = AxIWebBrowser2.GetInterface();
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserEvent.cs (1)
85using var pStream = _parent._documentStreamToSetOnLoad.ToIStream();
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
672using var clientSite = ComHelpers.GetComScope<IOleClientSite>(ActiveXSite);
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (2)
103using var oleObject = ComScope<IOleObject>.TryQueryFrom(pActiveObject, out HRESULT hr);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.Vista.cs (4)
21private protected abstract unsafe ComScope<IFileDialog> CreateVistaDialog(); 25using ComScope<IFileDialog> dialog = CreateVistaDialog(); 36using var events = ComHelpers.GetComScope<IFileDialogEvents>(new VistaDialogEvents(this)); 64using ComScope<IShellItem> initialDirectory = new(PInvoke.SHCreateShellItem(InitialDirectory));
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (5)
345using ComScope<IFileDialogCustomize> customize = new(null); 357using ComScope<IShellItem> initialDirectory = new(PInvoke.SHCreateShellItem(_initialDirectory)); 406using ComScope<IShellItemArray> itemArray = new(null); 412using ComScope<IShellItem> item = new(null); 426using ComScope<IShellItem> item = new(null);
System\Windows\Forms\Dialogs\CommonDialogs\OpenFileDialog.cs (6)
139using ComScope<IShellItem> item = new(null); 145using var openDialog = ComScope<IFileOpenDialog>.QueryFrom(dialog); 146using ComScope<IShellItemArray> items = new(null); 158using ComScope<IShellItem> item = new(null); 166private protected override unsafe ComScope<IFileDialog> CreateVistaDialog()
System\Windows\Forms\Dialogs\CommonDialogs\SaveFileDialog.cs (2)
159using ComScope<IShellItem> item = new(null); 164private protected override unsafe ComScope<IFileDialog> CreateVistaDialog()
System\Windows\Forms\Input\Cursor.cs (3)
405using ComScope<IPicture> picture = new(null); 408using ComScope<IPersistStream> persist = new(null); 411using var pStream = ComHelpers.GetComScope<IStream>(stream);
System\Windows\Forms\OLE\DropTarget.cs (2)
52using var unknown = ComScope<IUnknown>.QueryFrom(nativeDataObject);
System.Windows.Forms.Design (1)
System\ComponentModel\Design\MultilineStringEditor.OleCallback.cs (1)
30using ComScope<ILockBytes> pLockBytes = new(null);
System.Windows.Forms.Interop.Tests (2)
AccessibleObjectTests.cs (2)
742using var dispatch = ComHelpers.TryGetComScope<IDispatch>(accessible); 748using ComScope<ITypeInfo> typeInfo = new(null);
System.Windows.Forms.Primitives (26)
Microsoft\Office\IMsoComponentManager.NativeAdapter.cs (15)
24using var manager = _manager!.GetInterface(); 30using var manager = _manager!.GetInterface(); 36using var manager = _manager!.GetInterface(); 42using var manager = _manager!.GetInterface(); 48using var manager = _manager!.GetInterface(); 54using var manager = _manager!.GetInterface(); 60using var manager = _manager!.GetInterface(); 72using var manager = _manager!.GetInterface(); 83using var manager = _manager!.GetInterface(); 89using var manager = _manager!.GetInterface(); 95using var manager = _manager!.GetInterface(); 101using var manager = _manager!.GetInterface(); 107using var manager = _manager!.GetInterface(); 113using var manager = _manager!.GetInterface(); 119using var manager = _manager!.GetInterface();
System\Windows\Forms\AccessibilityExtensions.cs (1)
16using var unknown = ComHelpers.TryGetComScope<IUnknown>(accessible, out _);
System\Windows\Forms\FileDialogCustomPlacesCollection.cs (1)
15using ComScope<IShellItem> shellItem = new(customPlace.GetNativePath());
Windows\Win32\PInvoke.ImageList.cs (2)
123using var stream = pstm.ToIStream(); 135using var stream = pstm.ToIStream();
Windows\Win32\PInvoke.UiaDisconnectProvider.cs (1)
15using var providerScope = ComHelpers.GetComScope<IRawElementProviderSimple>(provider);
Windows\Win32\PInvoke.UiaRaiseNotificationEvent.cs (1)
20using var providerScope = ComHelpers.GetComScope<IRawElementProviderSimple>(provider);
Windows\Win32\PInvoke.UiaReturnRawElementProvider.cs (1)
18using var provider = ComHelpers.TryGetComScope<IRawElementProviderSimple>(el);
Windows\Win32\System\Com\ComSafeArrayScope.cs (1)
54using ComScope<IUnknown> unknown = new((IUnknown*)_value[i]);
Windows\Win32\System\Com\ComSafeArrayScopeExtensions.cs (1)
27using var pointer = ComHelpers.GetComScope<TComStruct>(interfaces[i]);
Windows\Win32\System\Com\StandardDispatch.cs (2)
130using ComScope<T> @interface = new(ComHelpers.GetComPointer<T>(_instance)); 187using ComScope<T> @interface = new(ComHelpers.GetComPointer<T>(_instance));
System.Windows.Forms.Primitives.Tests (70)
Interop\Ole32\IPictureTests.cs (5)
21using var picture = Icon.FromHandle(arrow.Handle).CreateIPicture(copy: true); 38using var picture = bitmap.CreateIPicture(); 54using var picture = bitmap.CreateIPictureDisp(); 74using var picture = bitmap.CreateIPicture(); 85using var picture = bitmap.CreateIPictureDisp();
Interop\Oleaut32\ITypeInfoTests.cs (35)
19using var iPictureDisp = image.CreateIPictureDisp(); 21using ComScope<ITypeInfo> typeInfo = new(null); 33using var iPictureDisp = image.CreateIPictureDisp(); 35using ComScope<ITypeInfo> typeInfo = new(null); 47using var iPictureDisp = image.CreateIPictureDisp(); 49using ComScope<ITypeInfo> typeInfo = new(null); 52using ComScope<ITypeLib> typeLib = new(null); 63using var iPictureDisp = image.CreateIPictureDisp(); 65using ComScope<ITypeInfo> typeInfo = new(null); 83using var iPictureDisp = image.CreateIPictureDisp(); 85using ComScope<ITypeInfo> typeInfo = new(null); 103using var iPictureDisp = image.CreateIPictureDisp(); 105using ComScope<ITypeInfo> typeInfo = new(null); 137using var iPictureDisp = image.CreateIPictureDisp(); 139using ComScope<ITypeInfo> typeInfo = new(null); 161using var iPictureDisp = image.CreateIPictureDisp(); 163using ComScope<ITypeInfo> typeInfo = new(null); 175using var iPictureDisp = image.CreateIPictureDisp(); 177using ComScope<ITypeInfo> typeInfo = new(null); 189using var iPictureDisp = image.CreateIPictureDisp(); 191using ComScope<ITypeInfo> typeInfo = new(null); 211using var iPictureDisp = image.CreateIPictureDisp(); 213using ComScope<ITypeInfo> typeInfo = new(null); 220using ComScope<ITypeInfo> refTypeInfo = new(null); 228using var iPictureDisp = image.CreateIPictureDisp(); 230using ComScope<ITypeInfo> typeInfo = new(null); 242using var iPictureDisp = image.CreateIPictureDisp(); 244using ComScope<ITypeInfo> typeInfo = new(null); 281using var iPictureDisp = image.CreateIPictureDisp(); 283using ComScope<ITypeInfo> typeInfo = new(null); 286using ComScope<ITypeComp> typeComp = new(null); 294using var iPictureDisp = image.CreateIPictureDisp(); 296using ComScope<ITypeInfo> typeInfo = new(null); 323using var iPictureDisp = image.CreateIPictureDisp(); 325using ComScope<ITypeInfo> typeInfo = new(null);
Interop\Oleaut32\SAFEARRAYTests.cs (1)
94using ComScope<IRecordInfo> recordInfo = new(new CustomRecordInfo().GetComInterface());
Interop\Oleaut32\VARIANTTests.cs (6)
938using ComScope<IUnknown> unknown = new((IUnknown*)(void*)Marshal.GetIUnknownForObject(o)); 970using ComScope<IUnknown> unknown = new((IUnknown*)(void*)Marshal.GetIUnknownForObject(o)); 5616using ComScope<IRecordInfo> pRecordInfo = new(recordInfo.GetComInterface()); 5631using ComScope<IRecordInfo> pRecordInfo = new(recordInfo.GetComInterface()); 5656using ComScope<IRecordInfo> pRecordInfo = new(record.GetComInterface()); 5682using ComScope<IRecordInfo> pRecordInfo = new(record.GetComInterface());
System\Windows\Forms\Automation\UiaTextRangeTests.cs (9)
31using ComScope<IRawElementProviderSimple> elementProviderScope = new(null); 229using ComScope<ITextRangeProvider> rangeScope = new(null); 246using var textRange2Scope = ComHelpers.GetComScope<ITextRangeProvider>(textRange2); 276using var textRangeScope = ComHelpers.GetComScope<ITextRangeProvider>(targetRange); 405using ComScope<ITextRangeProvider> actual = new(null); 432using ComScope<ITextRangeProvider> actual = new(null); 453using ComScope<ITextRangeProvider> actual = new(null); 844using ComScope<IRawElementProviderSimple> actual = new(null); 963using var targetRangeScope = ComHelpers.GetComScope<ITextRangeProvider>(targetRange);
Windows\Win32\AgileComPointerTests.cs (5)
21using var astream = agileStream.GetInterface(); 39using var proxyStreamPtr = proxyAgileStream.GetInterface(); 44using var proxyUnknownPtr = proxyAgileStream.GetInterface<IUnknown>(); 45using ComScope<IUnknown> originalUnknownPtr = new(null); 69using ComScope<IStream> streamScope = agile.GetInterface();
Windows\Win32\GlobalInterfaceTableTests.cs (1)
14using var stream = ComHelpers.TryGetComScope<IStream>(new MyStream(), out HRESULT hr);
Windows\Win32\System\Com\ComSafeArrayScopeTests.cs (1)
32using var expected = ComHelpers.GetComScope<IRawElementProviderSimple>(providers[0]);
Windows\Win32\System\Com\ComScopeTests.cs (1)
14ComScope<ITestObject> scope = new(ComHelpers.GetComPointer<ITestObject>(new TestObject()));
Windows\Win32\System\Com\IDispatchTests.cs (5)
17using var picture = image.CreateIPictureDisp(); 41using var picture = image.CreateIPictureDisp(); 44using ComScope<ITypeInfo> typeInfo = new(null); 52using var picture = image.CreateIPictureDisp(); 64using var picture = image.CreateIPictureDisp();
Windows\Win32\UI\Accessibility\AccessibleDispatchTests.cs (1)
17using var dispatch = ComHelpers.GetComScope<IDispatch>(accessibleObject);
System.Windows.Forms.Tests (184)
DataStreamFromComStreamTests.cs (2)
17using var stream = memoryStream.ToIStream(); 30using var stream = memoryStream.ToIStream();
SerializableTypesTests.cs (3)
47using var resultPropBag = result.GetPropBag(); 49using var statePropBag = state.GetPropBag(); 61using var streamOut = result.GetStream();
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (3)
2745using ComScope<UIA.IAccessible> accessible = new(null); 2747using ComScope<UIA.IAccessible> expected = new(ComHelpers.TryGetComPointer<UIA.IAccessible>(accessibleObject)); 2759using ComScope<UIA.IAccessible> accessible = new(null);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
1465using ComScope<IRawElementProviderFragmentRoot> actual = new(null);
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
106using ComScope<IRawElementProviderSimple> elementProvider = new(accessibilityObject.HostRawElementProvider);
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (1)
105using ComScope<IRawElementProviderSimple> provider = new(accessibilityObject.HostRawElementProvider);
System\Windows\Forms\Application.ComponentManagerTests.cs (12)
45using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock.Object)); 59using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock.Object)); 72using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock.Object)); 92using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock.Object)); 108using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock.Object)); 122using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock.Object)); 153using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock.Object)); 184using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(new MockWrapper(mock.Object))); 215using var component = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock.Object)); 298using var component1 = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock1.Object)); 301using var component2 = ComHelpers.GetComScope<IMsoComponent>(new MockWrapper(mock2.Object)); 336using ComScope<IMsoComponent> component = new(null);
System\Windows\Forms\AxHostTests.cs (3)
1612using var iPictureDisp = ComHelpers.GetComScope<IDispatch>(disp); 1637using var iPictureDisp = ComHelpers.GetComScope<IDispatch>(disp); 3083using var ocx = ComHelpers.GetComScope<IUnknown>(control.GetOcx());
System\Windows\Forms\ClipboardTests.cs (12)
465using var dataScope = ComHelpers.GetComScope<Com.IDataObject>(data); 468using ComScope<Com.IDataObject> proxy = new(null); 472using var dataUnknown = dataScope.Query<IUnknown>(); 473using var proxyUnknown = proxy.Query<IUnknown>(); 477using var realDataPointer = proxy.Query<IComCallableWrapper>(); 478using var realDataPointerUnknown = realDataPointer.Query<IUnknown>(); 1329using var iDataObject = ComHelpers.GetComScope<Com.IDataObject>(dataObject); 1330using ComScope<IUnknown> originalUnknown = iDataObject.Query<IUnknown>(); 1337using ComScope<Com.IDataObject> receivedIDataObject = default; 1343using ComScope<IUnknown> unknown = receivedIDataObject.Query<IUnknown>(); 1348using ComScope<IComCallableWrapper> wrapper = receivedIDataObject.Query<IComCallableWrapper>(); 1354using ComScope<IUnknown> wrapperUnknown = wrapper.Query<IUnknown>();
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (10)
163using ComScope<ITextRangeProvider> range = new(provider.DocumentRange); 164using ComScope<IRawElementProviderSimple> elementProvider = new(range.Value->GetEnclosingElement()); 211ComScope<ITextRangeProvider> uiaTextRange = new(null); 230using ComScope<ITextRangeProvider> uiaTextRange = new(null); 894using ComScope<ITextRangeProvider> range = new(null); 895using var rawElementProvider = ComHelpers.GetComScope<IRawElementProviderSimple>(comboBox.AccessibilityObject); 918using ComScope<ITextRangeProvider> range = new(null); 935using ComScope<ITextRangeProvider> range = new(null); 960using ComScope<ITextRangeProvider> range = new(selection[0]); 1023using ComScope<ITextRangeProvider> range = new(selection[0]);
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (2)
36using ComScope<IFont> iFont = new(null); 68using ComScope<IFont> iFont = new(null);
System\Windows\Forms\ComponentModel\Com2Interop\COM2PictureConverterTests.cs (8)
70using var unknown = ComHelpers.GetComScope<IUnknown>(nullIPicture); 80using var unknown = ComHelpers.GetComScope<IUnknown>(iconIPicture); 101using var unknown = ComHelpers.GetComScope<IUnknown>(bitmapIPicture); 123using var unknown = ComHelpers.GetComScope<IUnknown>(new TestIPicture(1, PICTYPE.PICTYPE_METAFILE)); 143using ComScope<IPicture> picture = ComScope<IPicture>.QueryFrom((IUnknown*)native); 164using ComScope<IPicture> picture = ComScope<IPicture>.QueryFrom((IUnknown*)native);
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (4)
36using var iPictureDisp = bitmap.CreateIPictureDisp(); 113ComScope<IUnknown> unknown = new(null); 162using ComScope<IAccessible> accessible = new(null); 191using var accessible = ComHelpers.GetComScope<IAccessible>(value);
System\Windows\Forms\Control.ActiveXFontMarshallerTests.cs (1)
23using ComScope<IFont> iFont = new((IFont*)native);
System\Windows\Forms\Control.ActiveXImplTests.cs (3)
22using var istream = memoryStream.ToIStream(); 46using var istream = memoryStream.ToIStream(); 64using var istream = memoryStream.ToIStream();
System\Windows\Forms\DataObjectComTests.cs (2)
29var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData); 47var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData);
System\Windows\Forms\DataObjectTests.cs (7)
2798using var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData); 2829using var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData); 2848using var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData); 2865using var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData); 2881using var inDataPtr = ComHelpers.GetComScope<Com.IDataObject>(inData); 2896using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 2917using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native);
System\Windows\Forms\FileDialogTests.cs (1)
847private protected override ComScope<IFileDialog> CreateVistaDialog() => default;
System\Windows\Forms\HtmlDocumentTests.cs (34)
96using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 121using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 226using var iHtmlElement2 = ComHelpers.GetComScope<IHTMLElement2>(active.DomElement); 312using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 344using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 410using var iHtmlDomNode = ComHelpers.GetComScope<IHTMLDOMNode>(element.Parent.DomElement); 411using var domElement = ComHelpers.GetComScope<IHTMLDOMNode>(element.DomElement); 412using ComScope<IHTMLDOMNode> node = new(null); 455using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 513using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 618using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 642using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 704using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 792using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 815using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 981using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 1005using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 1118using var iHTMLDocument3 = ComHelpers.GetComScope<IHTMLDocument3>(document.DomDocument); 1143using var iHTMLDocument3 = ComHelpers.GetComScope<IHTMLDocument3>(document.DomDocument); 1207using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 1231using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 1344using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 1368using var iHTMLDocument2 = ComHelpers.GetComScope<IHTMLDocument2>(document.DomDocument); 1489using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2017using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2056using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2094using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2132using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2170using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2208using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2246using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2284using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2322using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument); 2360using var iHTMLDocument4 = ComHelpers.GetComScope<IHTMLDocument4>(document.DomDocument);
System\Windows\Forms\HtmlElementTests.cs (47)
226using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 249using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 353using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 378using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 443using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 469using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 564using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 590using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 682using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 708using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 865using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 896using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 976using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 1002using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 1105using var iHTMLElement2 = ComHelpers.GetComScope<IHTMLElement2>(element.DomElement); 1129using var iHTMLElement2 = ComHelpers.GetComScope<IHTMLElement2>(element.DomElement); 1195using var iHTMLElement2 = ComHelpers.GetComScope<IHTMLElement2>(element.DomElement); 1219using var iHTMLElement2 = ComHelpers.GetComScope<IHTMLElement2>(element.DomElement); 1287using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 1288using ComScope<IHTMLStyle> htmlStyle = new(null); 1325using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 1326using ComScope<IHTMLStyle> htmlStyle = new(null); 1367using var iHTMLElement2 = ComHelpers.GetComScope<IHTMLElement2>(element.DomElement); 1391using var iHTMLElement2 = ComHelpers.GetComScope<IHTMLElement2>(element.DomElement); 1599using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 1641using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 1682using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 1870using var iHTMLElement = ComHelpers.GetComScope<IHTMLElement>(element.DomElement); 2565using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2606using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2647using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2688using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2730using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2771using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2812using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2853using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2894using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2935using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 2976using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 3017using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 3058using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 3099using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 3140using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 3181using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 3222using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 3263using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement); 3304using var iHTMLElement3 = ComHelpers.GetComScope<IHTMLElement3>(element.DomElement);
System\Windows\Forms\HtmlToClrEventProxyTest.cs (3)
18using var dispatchEx = ComHelpers.GetComScope<IDispatchEx>(proxy); 45using var dispatchEx = ComHelpers.GetComScope<IDispatchEx>(proxy); 74using var dispatch = ComHelpers.GetComScope<IDispatch>(proxy);
System\Windows\Forms\NativeToWinFormsAdapterTests.cs (11)
23using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 48using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 67using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 82using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 154using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 168using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 185using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 201using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 216using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 424using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native); 443using var comDataObject = ComHelpers.GetComScope<Com.IDataObject>(native);
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (1)
81using ComScope<IRawElementProviderFragment> previousAccessibleObject = new(null);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (9)
119using ComScope<ITextRangeProvider> documentRange = new(provider.DocumentRange); 140using ComScope<ITextRangeProvider> uiaTextRange = new(null); 152using ComScope<ITextRangeProvider> uiaTextRange = new(null); 759using ComScope<ITextRangeProvider> range = new(null); 774using ComScope<ITextRangeProvider> range = new(null); 795using ComScope<ITextRangeProvider> range = new(null); 809using ComScope<ITextRangeProvider> range = new(null); 830using ComScope<ITextRangeProvider> range = new(selection[0]); 872using ComScope<ITextRangeProvider> range = new(selection[0]);
System\Windows\Forms\WebBrowserTests.cs (3)
302using var webBrowser = ComHelpers.GetComScope<IWebBrowser2>(control.ActiveXInstance); 1735using var webBrowser = ComHelpers.GetComScope<IWebBrowser2>(control.ActiveXInstance); 3618using var webBrowser = ComHelpers.GetComScope<IWebBrowser2>(control.ActiveXInstance);
System.Windows.Forms.UI.IntegrationTests (5)
DragDropTests.cs (2)
135using ComScope<IUIAutomation> uiAutomation = new(null); 136using ComScope<IUIAutomationElement> uiAutomationElement = new(null);
RichTextBoxTests.cs (3)
213using ComScope<IRichEditOle> richEdit = new(null); 217using var textDocument = richEdit.TryQuery<ITextDocument>(out HRESULT hr); 221using ComScope<ITextRange> range = new(null);