18 instantiations of ComScope
Microsoft.Private.Windows.Core (18)
System\Private\Windows\Ole\ClipboardCore.cs (1)
182
proxyDataObject =
new
(null);
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
636
using ComScope<Com.IEnumFORMATETC> enumFORMATETC =
new
(null);
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (2)
46
using ComScope<Com.IEnumSTATDATA> nativeStatData =
new
(null);
55
using ComScope<Com.IEnumFORMATETC> nativeFormat =
new
(null);
System\Private\Windows\Ole\DragDropHelper.cs (5)
69
using ComScope<IDropTargetHelper> dropTargetHelper =
new
(null);
84
using ComScope<IDropTargetHelper> dropTargetHelper =
new
(null);
99
using ComScope<IDropTargetHelper> dropTargetHelper =
new
(null);
115
using ComScope<IDropTargetHelper> dropTargetHelper =
new
(null);
261
using ComScope<IDragSourceHelper2> dragSourceHelper =
new
(null);
Windows\Win32\System\Com\ComHelpers.cs (4)
29
new
(GetComPointer<T>(@object));
41
new
(TryGetComPointer<T>(@object, out hr));
355
using ComScope<ITypeLib> typelib =
new
(null);
359
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)
54
ComScope<TInterface> @interface =
new
(null);
81 references to ComScope
Microsoft.Private.Windows.Core (81)
System\IO\StreamExtensions.cs (1)
15
internal static
ComScope
<IStream> ToIStream(this Stream stream, bool makeSeekable = false)
System\Private\Windows\Ole\ClipboardCore.cs (5)
124
using
var
iDataObject = ComHelpers.GetComScope<IDataObject>(dataObject);
171
out
ComScope
<IDataObject> proxyDataObject,
205
using
var
unknown = proxyDataObject.Query<IUnknown>();
248
out
ComScope
<IDataObject> proxyDataObject,
273
out
ComScope
<IDataObject> proxyDataObject,
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (13)
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();
523
using
var
nativeDataObject = _nativeDataObject.GetInterface();
633
using
var
nativeDataObject = _nativeDataObject.GetInterface();
636
using
ComScope
<Com.IEnumFORMATETC> enumFORMATETC = new(null);
731
using
var
nativeDataObject = _nativeDataObject.GetInterface();
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (12)
29
using
var
nativeAdviseSink = ComHelpers.TryGetComScope<Com.IAdviseSink>(adviseSink);
33
using
var
nativeDataObject = _nativeDataObject.GetInterface();
40
using
var
nativeDataObject = _nativeDataObject.GetInterface();
46
using
ComScope
<Com.IEnumSTATDATA> nativeStatData = new(null);
47
using
var
nativeDataObject = _nativeDataObject.GetInterface();
55
using
ComScope
<Com.IEnumFORMATETC> nativeFormat = new(null);
56
using
var
nativeDataObject = _nativeDataObject.GetInterface();
67
using
var
nativeDataObject = _nativeDataObject.GetInterface();
77
using
var
nativeDataObject = _nativeDataObject.GetInterface();
87
using
var
nativeDataObject = _nativeDataObject.GetInterface();
95
using
var
nativeDataObject = _nativeDataObject.GetInterface();
103
using
var
nativeDataObject = _nativeDataObject.GetInterface();
System\Private\Windows\Ole\DragDropHelper.cs (8)
69
using
ComScope
<IDropTargetHelper> dropTargetHelper = new(null);
75
using
var
dataObjectScope = ComHelpers.GetComScope<IDataObject>(dataObject);
84
using
ComScope
<IDropTargetHelper> dropTargetHelper = new(null);
99
using
ComScope
<IDropTargetHelper> dropTargetHelper = new(null);
115
using
ComScope
<IDropTargetHelper> dropTargetHelper = new(null);
122
using
var
dataObjectScope = ComHelpers.GetComScope<IDataObject>(dataObject);
261
using
ComScope
<IDragSourceHelper2> dragSourceHelper = new(null);
297
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 (9)
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);
164
ComScope
<TInterface> comScope,
293
internal static object GetObjectForIUnknown<TInterface>(
ComScope
<TInterface> comScope)
340
public static
ComScope
<ITypeInfo> GetRegisteredTypeInfo(
355
using
ComScope
<ITypeLib> typelib = new(null);
359
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)
51
public static
ComScope
<TInterface> GetInterface<TInterface>(uint cookie, out HRESULT result)
54
ComScope
<TInterface> @interface = new(null);