84 references to IUnknown
System.Private.Windows.Core (59)
Windows\Win32\System\Com\AgileComPointer.cs (6)
48
uint count = ((
IUnknown
*)@interface)->Release();
66
using var currentUnknown = GetInterface<
IUnknown
>();
67
using var otherUnknown = other.GetInterface<
IUnknown
>();
74
using var currentUnknown = GetInterface<
IUnknown
>();
75
using ComScope<
IUnknown
> otherUnknown = ComScope<
IUnknown
>.QueryFrom(other);
Windows\Win32\System\Com\ComHelpers.cs (29)
88
IUnknown
* ccw = null;
92
ccw = (
IUnknown
*)WinFormsComWrappers.Instance.GetOrCreateComInterfaceForObject(@object, CreateComInterfaceFlags.None);
97
ccw = (
IUnknown
*)unknown;
105
ccw = (
IUnknown
*)Marshal.GetIUnknownForObject(@object);
119
if (typeof(T) == typeof(
IUnknown
))
136
IUnknown
* unknown,
156
/// <inheritdoc cref="TryGetObjectForIUnknown{TObject}(
IUnknown
*, bool, out TObject)"/>
163
/// <inheritdoc cref="TryGetObjectForIUnknown{TObject}(
IUnknown
*, bool, out TObject)"/>
176
IUnknown
* unknown = (
IUnknown
*)comPointer;
177
if (typeof(TInterface) == typeof(
IUnknown
))
182
HRESULT hr = unknown->QueryInterface(IID.Get<
IUnknown
>(), (void**)&unknown);
193
/// <inheritdoc cref="TryGetObjectForIUnknown{TObject}(
IUnknown
*, bool, out TObject)"/>
195
IUnknown
* unknown,
206
IUnknown
* unknown,
248
using ComScope<
IUnknown
> unknown = new(null);
249
((
IUnknown
*)comPointer)->QueryInterface(IID.Get<
IUnknown
>(), unknown).ThrowOnFailure();
257
using ComScope<
IUnknown
> ccw = new((
IUnknown
*)(void*)Marshal.GetIUnknownForObject(@object));
261
/// <inheritdoc cref="GetObjectForIUnknown(
IUnknown
*)"/>
270
IUnknown
* unknown = (
IUnknown
*)comPointer;
272
if (typeof(TInterface) == typeof(
IUnknown
))
277
unknown->QueryInterface(IID.Get<
IUnknown
>(), (void**)&unknown).ThrowOnFailure();
281
/// <inheritdoc cref="GetObjectForIUnknown(
IUnknown
*)"/>
289
internal static object GetObjectForIUnknown(
IUnknown
* unknown)
314
/// <see cref="
IUnknown
"/> vtable population hook for CsWin32's generated <see cref="IVTable"/> implementation.
316
static partial void PopulateIUnknownImpl<TComInterface>(
IUnknown
.Vtbl* vtable)
Windows\Win32\System\Com\ComScope.cs (11)
11
/// to ensure <see cref="
IUnknown
.Release"/> is called when going out of scope with the using.
28
/// <see cref="
IUnknown
.Interface"/> or some other interface tag to enforce that this is being used around
36
public
IUnknown
* AsUnknown => (
IUnknown
*)_value;
63
hr = ((
IUnknown
*)Value)->QueryInterface(IID.Get<TTo>(), scope);
73
((
IUnknown
*)Value)->QueryInterface(IID.Get<TTo>(), scope).ThrowOnFailure();
83
hr = from is null ? HRESULT.E_POINTER : ((
IUnknown
*)from)->QueryInterface(IID.Get<T>(), scope);
98
((
IUnknown
*)from)->QueryInterface(IID.Get<T>(), scope).ThrowOnFailure();
113
IUnknown
* unknown;
127
IUnknown
* unknown = (
IUnknown
*)_value;
Windows\Win32\System\Com\GlobalInterfaceTable.cs (1)
41
(
IUnknown
*)@interface,
Windows\Win32\System\Com\GlobalInterfaceTable.UnknownStrategy.cs (1)
21
_cookie = RegisterInterface((
IUnknown
*)unknown);
Windows\Win32\System\Com\WinFormsComWrappers.cs (4)
17
internal static void PopulateIUnknownVTable(
IUnknown
.Vtbl* unknown)
20
unknown->QueryInterface_1 = (delegate* unmanaged[Stdcall]<
IUnknown
*, Guid*, void**, HRESULT>)fpQueryInterface;
21
unknown->AddRef_2 = (delegate* unmanaged[Stdcall]<
IUnknown
*, uint>)fpAddRef;
22
unknown->Release_3 = (delegate* unmanaged[Stdcall]<
IUnknown
*, uint>)fpRelease;
Windows\Win32\System\Variant\VARIANT.cs (6)
165
IUnknown
* pInterface = *(
IUnknown
**)data;
394
result[i] = data[i] == IntPtr.Zero ? null : ComHelpers.GetObjectForIUnknown((
IUnknown
*)data[i]);
604
SetValue(array, ComHelpers.GetObjectForIUnknown((
IUnknown
*)data), indices, lowerBounds);
950
public static explicit operator VARIANT(
IUnknown
* value)
958
public static explicit operator
IUnknown
*(VARIANT value)
Windows\Win32\UI\Controls\Dialogs\PRINTDLGEXW.cs (1)
295
public unsafe
IUnknown
* lpCallback;
System.Windows.Forms.Primitives (25)
Microsoft\Office\IMsoComponent.cs (3)
124
/// <inheritdoc cref="
IUnknown
.QueryInterface(Guid*, void**)"/>
131
/// <inheritdoc cref="
IUnknown
.AddRef"/>
138
/// <inheritdoc cref="
IUnknown
.Release"/>
Microsoft\Office\IMsoComponentManager.cs (5)
36
/// <inheritdoc cref="
IUnknown
.QueryInterface(Guid*, void**)"/>
43
/// <inheritdoc cref="
IUnknown
.AddRef"/>
50
/// <inheritdoc cref="
IUnknown
.Release"/>
163
/// <inheritdoc cref="Interface.FCreateSubComponentManager(
IUnknown
*,
IUnknown
*, Guid*, void**)"/>
Microsoft\VisualStudio\Shell\ICategorizeProperties.cs (3)
34
/// <inheritdoc cref="
IUnknown
.QueryInterface(Guid*, void**)"/>
41
/// <inheritdoc cref="
IUnknown
.AddRef"/>
48
/// <inheritdoc cref="
IUnknown
.Release"/>
Microsoft\VisualStudio\Shell\IProvidePropertyBuilder.cs (3)
34
/// <inheritdoc cref="
IUnknown
.QueryInterface(Guid*, void**)"/>
41
/// <inheritdoc cref="
IUnknown
.AddRef"/>
48
/// <inheritdoc cref="
IUnknown
.Release"/>
Microsoft\VisualStudio\Shell\IVSMDPerPropertyBrowsing.cs (3)
35
/// <inheritdoc cref="
IUnknown
.QueryInterface(Guid*, void**)"/>
42
/// <inheritdoc cref="
IUnknown
.AddRef"/>
49
/// <inheritdoc cref="
IUnknown
.Release"/>
Microsoft\VisualStudio\Shell\IVsPerPropertyBrowsing.cs (3)
34
/// <inheritdoc cref="
IUnknown
.QueryInterface(Guid*, void**)"/>
41
/// <inheritdoc cref="
IUnknown
.AddRef"/>
48
/// <inheritdoc cref="
IUnknown
.Release"/>
System\Windows\Forms\AccessibilityExtensions.cs (1)
11
/// <inheritdoc cref="PInvoke.LresultFromObject(Guid*, WPARAM,
IUnknown
*)"/>
System\Windows\Forms\IExtender.cs (3)
31
/// <inheritdoc cref="
IUnknown
.QueryInterface(Guid*, void**)"/>
38
/// <inheritdoc cref="
IUnknown
.AddRef()"/>
45
/// <inheritdoc cref="
IUnknown
.Release()"/>
Windows\Win32\System\Com\UnknownDispatch.cs (1)
7
/// Base <see cref="IDispatch"/> class for <see cref="
IUnknown
"/>.