18 instantiations of ComScope
Microsoft.Private.Windows.Core (18)
System\Private\Windows\Ole\ClipboardCore.cs (1)
182proxyDataObject = new(null);
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
636using 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 (4)
29new(GetComPointer<T>(@object)); 41new(TryGetComPointer<T>(@object, out hr)); 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);
81 references to ComScope
Microsoft.Private.Windows.Core (81)
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, 205using var unknown = proxyDataObject.Query<IUnknown>(); 248out ComScope<IDataObject> proxyDataObject, 273out ComScope<IDataObject> proxyDataObject,
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (13)
36using var nativeDataObject = _nativeDataObject.GetInterface(); 42using var nativeDataObject = _nativeDataObject.GetInterface(); 48using var nativeDataObject = _nativeDataObject.GetInterface(); 54using var nativeDataObject = _nativeDataObject.GetInterface(); 60using var nativeDataObject = _nativeDataObject.GetInterface(); 66using var nativeDataObject = _nativeDataObject.GetInterface(); 72using var nativeDataObject = _nativeDataObject.GetInterface(); 78using var nativeDataObject = _nativeDataObject.GetInterface(); 84using var nativeDataObject = _nativeDataObject.GetInterface(); 523using var nativeDataObject = _nativeDataObject.GetInterface(); 633using var nativeDataObject = _nativeDataObject.GetInterface(); 636using ComScope<Com.IEnumFORMATETC> enumFORMATETC = new(null); 731using 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 (9)
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, 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);