diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMapperManagers/ID2D1DrawInfoUpdateContexInternal.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMapperManagers/ID2D1DrawInfoUpdateContexInternal.cs new file mode 100644 index 00000000..5f2ad7f6 --- /dev/null +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMapperManagers/ID2D1DrawInfoUpdateContexInternal.cs @@ -0,0 +1,54 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; + +#pragma warning disable CS0649 + +namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMapperManagers; + +/// +/// An internal version of that supports being closed, to manage lifetime scopes. +/// +[Guid("CF2F5BB0-3F5E-4D6E-8FF1-D9A7EB6C0250")] +internal unsafe struct ID2D1DrawInfoUpdateContexInternal +{ + /// + /// Gets the for (CF2F5BB0-3F5E-4D6E-8FF1-D9A7EB6C0250). + /// + public static ref readonly Guid Guid + { + get + { + ReadOnlySpan data = new byte[] { + 0xCF, 0x2F, 0x5B, 0xB0, + 0x3F, 0x5E, + 0x4D, 0x6E, + 0x8F, 0xF1, + 0xD9, + 0xA7, + 0xEB, + 0x6C, + 0x02, + 0x50 + }; + + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + /// + /// The vtable for the current instance. + /// + private readonly void** lpVtbl; + + /// + /// Closes the current instance. + /// + /// An for the operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public HRESULT Close(uint* size) + { + return ((delegate* unmanaged[Stdcall])this.lpVtbl[3])((ID2D1DrawInfoUpdateContex*)Unsafe.AsPointer(ref this)); + } +} \ No newline at end of file