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