<PackageReference Include="System.Drawing.Common" Version="10.0.0-preview.5.25277.114" />

PointerExtensions

static class PointerExtensions
using System.Runtime.CompilerServices; namespace Windows.Win32.Foundation { internal static class PointerExtensions { public unsafe static T* GetPointer<[IsUnmanaged] T>([Nullable(new byte[] { 1, 0 })] this IPointer<T> pointer) where T : struct { return (T*)(long)pointer.Pointer; } } }