// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

namespace Win32.Graphics.Direct3D12;

/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12SDKConfiguration1"]/*' />
/// <unmanaged>ID3D12SDKConfiguration1</unmanaged>
[Guid("8aaf9303-ad25-48b9-9a57-d9c37e009d9f")]
[NativeTypeName("struct ID3D12SDKConfiguration1 : ID3D12SDKConfiguration")]
[NativeInheritance("ID3D12SDKConfiguration")]
public unsafe partial struct ID3D12SDKConfiguration1 : ID3D12SDKConfiguration1.Interface, INativeGuid
{
	public static ref readonly Guid IID_ID3D12SDKConfiguration1
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0x03, 0x93, 0xAF, 0x8A,
				0x25, 0xAD,
				0xB9, 0x48,
				0x9A,
				0x57,
				0xD9,
				0xC3,
				0x7E,
				0x00,
				0x9D,
				0x9F
			};

			Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
			return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
		}
	}

#if NET6_0_OR_GREATER
	static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID3D12SDKConfiguration1));
#else
	public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID3D12SDKConfiguration1));
#endif

	public void** lpVtbl;

	/// <inheritdoc cref="IUnknown.QueryInterface" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(0)]
	public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12SDKConfiguration1*, Guid*, void**, int>)(lpVtbl[0]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this), riid, ppvObject);
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12SDKConfiguration1*, Guid*, void**, int>)(lpVtbl[0]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this), riid, ppvObject);
#endif
	}

	/// <inheritdoc cref="IUnknown.AddRef" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(1)]
	[return: NativeTypeName("ULONG")]
	public uint AddRef()
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12SDKConfiguration1*, uint>)(lpVtbl[1]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this));
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12SDKConfiguration1*, uint>)(lpVtbl[1]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this));
#endif
	}

	/// <inheritdoc cref="IUnknown.Release" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	[return: NativeTypeName("ULONG")]
	public uint Release()
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12SDKConfiguration1*, uint>)(lpVtbl[2]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this));
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12SDKConfiguration1*, uint>)(lpVtbl[2]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this));
#endif
	}

	/// <inheritdoc cref="ID3D12SDKConfiguration.SetSDKVersion" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public HResult SetSDKVersion(uint SDKVersion, sbyte* SDKPath)
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12SDKConfiguration1*, uint, sbyte*, int>)(lpVtbl[3]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this), SDKVersion, SDKPath);
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12SDKConfiguration1*, uint, sbyte*, int>)(lpVtbl[3]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this), SDKVersion, SDKPath);
#endif
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12SDKConfiguration1::CreateDeviceFactory"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public HResult CreateDeviceFactory(uint SDKVersion, sbyte* SDKPath, Guid* riid, void** ppvFactory)
	{
#if NET6_0_OR_GREATER
		return ((delegate* unmanaged<ID3D12SDKConfiguration1*, uint, sbyte*, Guid*, void**, int>)(lpVtbl[4]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this), SDKVersion, SDKPath, riid, ppvFactory);
#else
		return ((delegate* unmanaged[Stdcall]<ID3D12SDKConfiguration1*, uint, sbyte*, Guid*, void**, int>)(lpVtbl[4]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this), SDKVersion, SDKPath, riid, ppvFactory);
#endif
	}

	/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12SDKConfiguration1::FreeUnusedSDKs"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public void FreeUnusedSDKs()
	{
#if NET6_0_OR_GREATER
		((delegate* unmanaged<ID3D12SDKConfiguration1*, void>)(lpVtbl[5]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this));
#else
		((delegate* unmanaged[Stdcall]<ID3D12SDKConfiguration1*, void>)(lpVtbl[5]))((ID3D12SDKConfiguration1*)Unsafe.AsPointer(ref this));
#endif
	}

	public interface Interface : ID3D12SDKConfiguration.Interface
	{
		[VtblIndex(4)]
		HResult CreateDeviceFactory(uint SDKVersion, sbyte* SDKPath, Guid* riid, void** ppvFactory);

		[VtblIndex(5)]
		void FreeUnusedSDKs();
	}
}

