// ------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// ------------------------------------------------------------------------------
namespace Win32.Graphics.DirectComposition;
///
/// IDCompositionTarget
[Guid("eacdd04c-117e-4e17-88f4-d1b12b0e3d89")]
[NativeTypeName("struct IDCompositionTarget : IUnknown")]
[NativeInheritance("IUnknown")]
public unsafe partial struct IDCompositionTarget : INativeGuid
{
public static ref readonly Guid IID_IDCompositionTarget
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan data = new byte[] {
0x4C, 0xD0, 0xCD, 0xEA,
0x7E, 0x11,
0x17, 0x4E,
0x88,
0xF4,
0xD1,
0xB1,
0x2B,
0x0E,
0x3D,
0x89
};
Debug.Assert(data.Length == Unsafe.SizeOf());
return ref Unsafe.As(ref MemoryMarshal.GetReference(data));
}
}
#if NET6_0_OR_GREATER
static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDCompositionTarget));
#else
public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDCompositionTarget));
#endif
public void** lpVtbl;
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(0)]
public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IUnknown*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(1)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IUnknown*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(2)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IUnknown*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)]
public HResult SetRoot(IDCompositionVisual* visual)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDCompositionTarget*)Unsafe.AsPointer(ref this), visual);
}
}