Esempio n. 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);
        }
Esempio n. 2
0
 private static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc lpfn, IntPtr lParam);
Esempio n. 3
0
 public static extern bool EnumDesktopWindows(
     IntPtr hDesktop, EnumDesktopWindowsProc callback,
     IntPtr lParam);
Esempio n. 4
0
 public static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc callback, IntPtr lParam);
Esempio n. 5
0
 private static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc lpfn, IntPtr lParam);