// ------------------------------------------------------------------------------
//
// 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.Dxgi;
///
/// IDXGIOutputDuplication
[Guid("191cfac3-a341-470d-b26e-a864f428319c")]
[NativeTypeName("struct IDXGIOutputDuplication : IDXGIObject")]
[NativeInheritance("IDXGIObject")]
public unsafe partial struct IDXGIOutputDuplication : IDXGIOutputDuplication.Interface, INativeGuid
{
public static ref readonly Guid IID_IDXGIOutputDuplication
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan data = new byte[] {
0xC3, 0xFA, 0x1C, 0x19,
0x41, 0xA3,
0x0D, 0x47,
0xB2,
0x6E,
0xA8,
0x64,
0xF4,
0x28,
0x31,
0x9C
};
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_IDXGIOutputDuplication));
#else
public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDXGIOutputDuplication));
#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]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(1)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(2)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)]
public HResult SetPrivateData(Guid* Name, uint DataSize, void* pData)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), Name, DataSize, pData);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)]
public HResult SetPrivateDataInterface(Guid* Name, IUnknown* pUnknown)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), Name, pUnknown);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(5)]
public HResult GetPrivateData(Guid* Name, uint* pDataSize, void* pData)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), Name, pDataSize, pData);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(6)]
public HResult GetParent(Guid* riid, void** ppParent)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), riid, ppParent);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(7)]
public void GetDesc(OutduplDescription* pDesc)
{
((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), pDesc);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult AcquireNextFrame(uint TimeoutInMilliseconds, OutduplFrameInfo* pFrameInfo, IDXGIResource** ppDesktopResource)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), TimeoutInMilliseconds, pFrameInfo, ppDesktopResource);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(9)]
public HResult GetFrameDirtyRects(uint DirtyRectsBufferSize, RawRect* pDirtyRectsBuffer, uint* pDirtyRectsBufferSizeRequired)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), DirtyRectsBufferSize, pDirtyRectsBuffer, pDirtyRectsBufferSizeRequired);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(10)]
public HResult GetFrameMoveRects(uint MoveRectsBufferSize, OutduplMoveRect* pMoveRectBuffer, uint* pMoveRectsBufferSizeRequired)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), MoveRectsBufferSize, pMoveRectBuffer, pMoveRectsBufferSizeRequired);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(11)]
public HResult GetFramePointerShape(uint PointerShapeBufferSize, void* pPointerShapeBuffer, uint* pPointerShapeBufferSizeRequired, OutduplPointerShapeInfo* pPointerShapeInfo)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), PointerShapeBufferSize, pPointerShapeBuffer, pPointerShapeBufferSizeRequired, pPointerShapeInfo);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(12)]
public HResult MapDesktopSurface(MappedRect* pLockedRect)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this), pLockedRect);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
public HResult UnMapDesktopSurface()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
public HResult ReleaseFrame()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDXGIOutputDuplication*)Unsafe.AsPointer(ref this));
}
public interface Interface : IDXGIObject.Interface
{
[VtblIndex(7)]
void GetDesc(OutduplDescription* pDesc);
[VtblIndex(8)]
HResult AcquireNextFrame(uint TimeoutInMilliseconds, OutduplFrameInfo* pFrameInfo, IDXGIResource** ppDesktopResource);
[VtblIndex(9)]
HResult GetFrameDirtyRects(uint DirtyRectsBufferSize, RawRect* pDirtyRectsBuffer, uint* pDirtyRectsBufferSizeRequired);
[VtblIndex(10)]
HResult GetFrameMoveRects(uint MoveRectsBufferSize, OutduplMoveRect* pMoveRectBuffer, uint* pMoveRectsBufferSizeRequired);
[VtblIndex(11)]
HResult GetFramePointerShape(uint PointerShapeBufferSize, void* pPointerShapeBuffer, uint* pPointerShapeBufferSizeRequired, OutduplPointerShapeInfo* pPointerShapeInfo);
[VtblIndex(12)]
HResult MapDesktopSurface(MappedRect* pLockedRect);
[VtblIndex(13)]
HResult UnMapDesktopSurface();
[VtblIndex(14)]
HResult ReleaseFrame();
}
}