// ------------------------------------------------------------------------------
// <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.Direct3D.Dxc;

/// <unmanaged>IDxcResult</unmanaged>
[Guid("58346cda-dde7-4497-9461-6f87af5e0659")]
[NativeTypeName("struct IDxcResult : IDxcOperationResult")]
[NativeInheritance("IDxcOperationResult")]
public unsafe partial struct IDxcResult : IDxcResult.Interface, INativeGuid
{
	public static ref readonly Guid IID_IDxcResult
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0xDA, 0x6C, 0x34, 0x58,
				0xE7, 0xDD,
				0x97, 0x44,
				0x94,
				0x61,
				0x6F,
				0x87,
				0xAF,
				0x5E,
				0x06,
				0x59
			};

			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_IDxcResult));
#else
	public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDxcResult));
#endif

	public void** lpVtbl;

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

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

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

	/// <inheritdoc cref="IDxcOperationResult.GetStatus" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public HResult GetStatus(HResult* pStatus)
	{
		return ((delegate* unmanaged[Stdcall]<IDxcResult*, HResult*, int>)(lpVtbl[3]))((IDxcResult*)Unsafe.AsPointer(ref this), pStatus);
	}

	/// <inheritdoc cref="IDxcOperationResult.GetResult" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public HResult GetResult(IDxcBlob** ppResult)
	{
		return ((delegate* unmanaged[Stdcall]<IDxcResult*, IDxcBlob**, int>)(lpVtbl[4]))((IDxcResult*)Unsafe.AsPointer(ref this), ppResult);
	}

	/// <inheritdoc cref="IDxcOperationResult.GetErrorBuffer" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public HResult GetErrorBuffer(IDxcBlobEncoding** ppErrors)
	{
		return ((delegate* unmanaged[Stdcall]<IDxcResult*, IDxcBlobEncoding**, int>)(lpVtbl[5]))((IDxcResult*)Unsafe.AsPointer(ref this), ppErrors);
	}

	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(6)]
	public Bool32 HasOutput(DxcOutKind dxcOutKind)
	{
		return ((delegate* unmanaged[Stdcall]<IDxcResult*, DxcOutKind, Bool32>)(lpVtbl[6]))((IDxcResult*)Unsafe.AsPointer(ref this), dxcOutKind);
	}

	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(7)]
	public HResult GetOutput(DxcOutKind dxcOutKind, Guid* iid, void** ppvObject, IDxcBlobUtf16** ppOutputName)
	{
		return ((delegate* unmanaged[Stdcall]<IDxcResult*, DxcOutKind, Guid*, void**, IDxcBlobUtf16**, int>)(lpVtbl[7]))((IDxcResult*)Unsafe.AsPointer(ref this), dxcOutKind, iid, ppvObject, ppOutputName);
	}

	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(8)]
	public uint GetNumOutputs()
	{
		return ((delegate* unmanaged[Stdcall]<IDxcResult*, uint>)(lpVtbl[8]))((IDxcResult*)Unsafe.AsPointer(ref this));
	}

	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(9)]
	public DxcOutKind GetOutputByIndex(uint Index)
	{
		return ((delegate* unmanaged[Stdcall]<IDxcResult*, uint, DxcOutKind>)(lpVtbl[9]))((IDxcResult*)Unsafe.AsPointer(ref this), Index);
	}

	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(10)]
	public DxcOutKind PrimaryOutput()
	{
		return ((delegate* unmanaged[Stdcall]<IDxcResult*, DxcOutKind>)(lpVtbl[10]))((IDxcResult*)Unsafe.AsPointer(ref this));
	}
	public interface Interface : IDxcOperationResult.Interface
	{
		[VtblIndex(6)]
		Bool32 HasOutput(DxcOutKind dxcOutKind);

		[VtblIndex(7)]
		HResult GetOutput(DxcOutKind dxcOutKind, Guid* iid, void** ppvObject, IDxcBlobUtf16** ppOutputName);

		[VtblIndex(8)]
		uint GetNumOutputs();

		[VtblIndex(9)]
		DxcOutKind GetOutputByIndex(uint Index);

		[VtblIndex(10)]
		DxcOutKind PrimaryOutput();
	}
}

