using System.Runtime.InteropServices; namespace QuikDawEditor.EDITING; internal class NativeMethods { private delegate bool EnumWindowsProc(IntPtr hWnd, int lParam); [DllImport("USER32.DLL")] private static extern bool EnumWindows(EnumWindowsProc enumFunc, int lParam); [DllImport("user32", EntryPoint = "GetWindowTextLengthA", CharSet = CharSet.Auto)] static extern int GetWindowTextLength(IntPtr hwnd); [DllImport("user32", EntryPoint = "GetWindowTextA")] public static extern int GetWindowText(IntPtr hwnd, System.Text.StringBuilder lpString, int cch); [DllImport("kernel32", SetLastError = true)] public static extern IntPtr GetProcAddress(IntPtr hModule, string procName); [DllImport("kernel32.dll")] public static extern IntPtr LoadLibrary(string dllToLoad); }