Beispiel #1
0
        public static List <IntPtr> GetDesktopWindows(IntPtr desktop)
        {
            if (desktop == IntPtr.Zero)
            {
                throw new ArgumentNullException(nameof(desktop));
            }

            var windows = new List <IntPtr>();
            EnumDesktopWindowsProc @delegate =
                (window, p) => {
                windows.Add(window);
                return(true);
            };

            EnumDesktopWindows(desktop, @delegate, IntPtr.Zero);
            return(windows);
        }
Beispiel #2
0
 private static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc lpfn, IntPtr lParam);
Beispiel #3
0
 public static extern bool EnumDesktopWindows(
     IntPtr hDesktop, EnumDesktopWindowsProc callback,
     IntPtr lParam);
Beispiel #4
0
 public static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc callback, IntPtr lParam);
Beispiel #5
0
 private static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc lpfn, IntPtr lParam);