89 instantiations of ComScope
System.Private.Windows.Core (20)
System\Private\Windows\Ole\ClipboardCore.cs (1)
182proxyDataObject = new(null);
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
677using ComScope<Com.IEnumFORMATETC> enumFORMATETC = new(null);
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (2)
46using ComScope<Com.IEnumSTATDATA> nativeStatData = new(null); 55using ComScope<Com.IEnumFORMATETC> nativeFormat = new(null);
System\Private\Windows\Ole\DragDropHelper.cs (5)
69using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 84using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 99using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 115using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 261using ComScope<IDragSourceHelper2> dragSourceHelper = new(null);
Windows\Win32\System\Com\ComHelpers.cs (6)
29new(GetComPointer<T>(@object)); 41new(TryGetComPointer<T>(@object, out hr)); 258using ComScope<ComUnknown> unknown = new(null); 267using ComScope<ComUnknown> ccw = new((ComUnknown*)(void*)Marshal.GetIUnknownForObject(@object)); 355using ComScope<ITypeLib> typelib = new(null); 359ComScope<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)
54ComScope<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)
665using ComScope<IOleClientSite> clientSite = new(null);
System\Windows\Forms\ActiveX\AxHost.cs (5)
2217using ComScope<IClassFactory2> factory = new(null); 2256using ComScope<IUnknown> unknown = new(null); 2272using ComScope<IClassFactory2> factory = new(null); 2283using ComScope<IUnknown> unknown = new(null); 3759using 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)
1646using ComScope<IRichEditOle> richEdit = new(null); 1670using ComScope<ITextRange> windowTextRange = new(null); 1687using 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.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));
594 references to ComScope
System.Drawing.Common (9)
System\Drawing\Bitmap.cs (1)
58using var iStream = stream.ToIStream(makeSeekable: true);
System\Drawing\Icon.cs (2)
806using var iPicture = this.CreateIPicture(copy: false); 807using var iStream = outputStream.ToIStream(makeSeekable: true);
System\Drawing\Image.cs (1)
158using var iStream = stream.ToIStream(makeSeekable: true);
System\Drawing\Imaging\Metafile.cs (5)
345using var iStream = stream.ToIStream(makeSeekable: true); 453using var iStream = stream.ToIStream(makeSeekable: true); 477using var iStream = stream.ToIStream(makeSeekable: true); 502using var iStream = stream.ToIStream(makeSeekable: true); 609using var iStream = stream.ToIStream(makeSeekable: true);
System.Private.Windows.Core (83)
System\IO\StreamExtensions.cs (1)
15internal static ComScope<IStream> ToIStream(this Stream stream, bool makeSeekable = false)
System\Private\Windows\Ole\ClipboardCore.cs (5)
124using var iDataObject = ComHelpers.GetComScope<IDataObject>(dataObject); 171out ComScope<IDataObject> proxyDataObject, 217using ComScope<IComCallableWrapper> realDataObject = proxyDataObject.TryQuery<IComCallableWrapper>(out HRESULT wrapperResult); 248out ComScope<IDataObject> proxyDataObject, 273out ComScope<IDataObject> proxyDataObject,
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (13)
47using var nativeDataObject = _nativeDataObject.GetInterface(); 53using var nativeDataObject = _nativeDataObject.GetInterface(); 59using var nativeDataObject = _nativeDataObject.GetInterface(); 65using var nativeDataObject = _nativeDataObject.GetInterface(); 71using var nativeDataObject = _nativeDataObject.GetInterface(); 77using var nativeDataObject = _nativeDataObject.GetInterface(); 83using var nativeDataObject = _nativeDataObject.GetInterface(); 89using var nativeDataObject = _nativeDataObject.GetInterface(); 95using var nativeDataObject = _nativeDataObject.GetInterface(); 564using var nativeDataObject = _nativeDataObject.GetInterface(); 674using var nativeDataObject = _nativeDataObject.GetInterface(); 677using ComScope<Com.IEnumFORMATETC> enumFORMATETC = new(null); 772using var nativeDataObject = _nativeDataObject.GetInterface();
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (12)
29using var nativeAdviseSink = ComHelpers.TryGetComScope<Com.IAdviseSink>(adviseSink); 33using var nativeDataObject = _nativeDataObject.GetInterface(); 40using var nativeDataObject = _nativeDataObject.GetInterface(); 46using ComScope<Com.IEnumSTATDATA> nativeStatData = new(null); 47using var nativeDataObject = _nativeDataObject.GetInterface(); 55using ComScope<Com.IEnumFORMATETC> nativeFormat = new(null); 56using var nativeDataObject = _nativeDataObject.GetInterface(); 67using var nativeDataObject = _nativeDataObject.GetInterface(); 77using var nativeDataObject = _nativeDataObject.GetInterface(); 87using var nativeDataObject = _nativeDataObject.GetInterface(); 95using var nativeDataObject = _nativeDataObject.GetInterface(); 103using var nativeDataObject = _nativeDataObject.GetInterface();
System\Private\Windows\Ole\DragDropHelper.cs (8)
69using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 75using var dataObjectScope = ComHelpers.GetComScope<IDataObject>(dataObject); 84using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 99using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 115using ComScope<IDropTargetHelper> dropTargetHelper = new(null); 122using var dataObjectScope = ComHelpers.GetComScope<IDataObject>(dataObject); 261using ComScope<IDragSourceHelper2> dragSourceHelper = new(null); 297using 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); 164ComScope<TInterface> comScope, 258using ComScope<ComUnknown> unknown = new(null); 267using ComScope<ComUnknown> ccw = new((ComUnknown*)(void*)Marshal.GetIUnknownForObject(@object)); 293internal static object GetObjectForIUnknown<TInterface>(ComScope<TInterface> comScope) 340public static ComScope<ITypeInfo> GetRegisteredTypeInfo( 355using ComScope<ITypeLib> typelib = new(null); 359ComScope<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)
51public static ComScope<TInterface> GetInterface<TInterface>(uint cookie, out HRESULT result) 54ComScope<TInterface> @interface = new(null);
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>(); 658using var oleObject = ComScope<IOleObject>.TryQueryFrom(pActiveObject, out HRESULT hr); 665using 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>(); 807using var oleControl = GetComScope<IOleControl>(); 1123using var oleObject = GetComScope<IOleObject>(); 1142using var oleObject = GetComScope<IOleObject>(); 1163using var inPlaceObject = GetComScope<IOleInPlaceObject>(); 1476using var inPlaceObject = GetComScope<IOleInPlaceObject>(); 1687using var activeObject = _iOleInPlaceActiveObjectExternal is { } external 1745using var oleControl = GetComScope<IOleControl>(); 1877using (var stream = ms.ToIStream()) 1881using var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance); 1886using var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(_instance); 1899using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance); 1906using (var propertyBag = ComHelpers.GetComScope<IPropertyBag>(propBag)) 1907using (var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(_instance)) 2031using (var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance)) 2038using (var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(_instance)) 2045using (var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance)) 2148using var pClientSite = ComHelpers.TryGetComScope<IOleClientSite>(_oleSite, out HRESULT hr); 2150using var oleObject = GetComScope<IOleObject>(); 2164using var oleControl = GetComScope<IOleControl>(); 2186using var inPlaceObject = GetComScope<IOleInPlaceObject>(); 2217using ComScope<IClassFactory2> factory = new(null); 2256using ComScope<IUnknown> unknown = new(null); 2272using ComScope<IClassFactory2> factory = new(null); 2283using ComScope<IUnknown> unknown = new(null); 2340using var categorizeProperties = ComHelpers.TryGetComScope<ICategorizeProperties>(_instance, out HRESULT hr); 2742using var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(_instance, out HRESULT hr); 2756using var persistStoragePtr = ComHelpers.TryGetComScope<IPersistStorage>(_instance, out hr); 2761using var storage = _ocxState.GetStorage(); 2766using var persistPropBag = ComHelpers.TryGetComScope<IPersistPropertyBag>(_instance, out hr); 2782using (var stream = _ocxState.GetStream()) 2785using var persistStream = ComHelpers.GetComScope<IPersistStream>(_instance); 2791using (var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(_instance, out HRESULT hr)) 2795using (var stream = _ocxState.GetStream()) 2813using (var storage = _ocxState.GetStorage()) 2821using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(_instance); 2828using (var propBag = _ocxState.GetPropBag()) 2834using var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(_instance); 2922using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 2933using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 2956using ComScope<IUnknown> unknown = ComHelpers.TryGetComScope<IUnknown>(_instance, out HRESULT hr); 3009using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(_instance, out HRESULT hr); 3024using var unknown = ComHelpers.GetComScope<IUnknown>(_instance); 3135using var inPlaceObject = GetComScope<IOleInPlaceObject>(); 3416using var oleObject = GetComScope<IOleObject>(); 3466using var oleObject = GetComScope<IOleObject>(); 3470using var clientSite = ComHelpers.GetComScope<IOleClientSite>(_oleSite); 3479using var clientSite = ComHelpers.GetComScope<IOleClientSite>(_oleSite); 3516private ComScope<T> GetComScope<T>() where T : unmanaged, IComIID 3519private ComScope<T> TryGetComScope<T>(out HRESULT hr) where T : unmanaged, IComIID 3554using var iPicture = ComHelpers.TryGetComScope<IPictureDisp>(picture, out HRESULT hr); 3578using var pictureDisp = ComHelpers.TryGetComScope<IPictureDisp>(picture, out HRESULT hr); 3759using 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)
4962using var dropSource = ComHelpers.GetComScope<IDropSource>( 4964using 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)
3091using 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)
1646using ComScope<IRichEditOle> richEdit = new(null); 1654using var textDocument = richEdit.TryQuery<ITextDocument>(out HRESULT hr); 1670using ComScope<ITextRange> windowTextRange = new(null); 1687using 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)
2198using var dropSource = ComHelpers.GetComScope<IDropSource>(CreateDropSource(dataObject, dragImage, cursorOffset, useDefaultDragImage)); 2199using 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(); 1196using var webBrowser2 = AxIWebBrowser2.GetInterface(); 1314using 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)
100using 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.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));