mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-06 11:55:31 +08:00
18 lines
664 B
C#
18 lines
664 B
C#
using System.Runtime.InteropServices;
|
|
using Vanara.PInvoke;
|
|
|
|
namespace Fischless.GameCapture.DwmSharedSurface.Helpers;
|
|
|
|
internal class NativeMethods
|
|
{
|
|
|
|
public delegate bool DwmGetDxSharedSurfaceDelegate(IntPtr hWnd, out IntPtr phSurface, out long pAdapterLuid, out long pFmtWindow, out long pPresentFlags, out long pWin32KUpdateId);
|
|
|
|
public static DwmGetDxSharedSurfaceDelegate DwmGetDxSharedSurface;
|
|
|
|
static NativeMethods()
|
|
{
|
|
var ptr = Kernel32.GetProcAddress(Kernel32.GetModuleHandle("user32"), "DwmGetDxSharedSurface");
|
|
DwmGetDxSharedSurface = Marshal.GetDelegateForFunctionPointer<DwmGetDxSharedSurfaceDelegate>(ptr);
|
|
}
|
|
} |