<PackageReference Include="System.Drawing.Common" Version="10.0.0-rc.2.25502.107" />

ComScope<T>

Lifetime management struct for a native COM pointer. Meant to be utilized in a using statement to ensure Release is called when going out of scope with the using.
public IUnknown* AsUnknown { get; }

public bool IsNull { get; }

public T* Value { get; }

public ComScope(T* value)

public static T* op_Implicit(ref ComScope scope)

public static Void* op_Implicit(ref ComScope scope)

public static IntPtr op_Implicit(ref ComScope scope)

public static T** op_Implicit(ref ComScope scope)

public static Void** op_Implicit(ref ComScope scope)

Create a ComScope<T> from the given COM interface. Throws on failure.

public static ComScope<T> TryQueryFrom<TFrom>(TFrom* from, out HRESULT hr) where TFrom : ValueType modreq(System.Runtime.InteropServices.UnmanagedType), IComIID

Attempt to create a ComScope<T> from the given COM interface.

public void Dispose()

Queries the requested interface into a new ComScope<T>.

Simple helper for checking if a given interface is supported. Only use this if you don't intend to use the interface, otherwise use TryQuery<T>.

Tries querying the requested interface into a new ComScope<T>.