EnumDesktopWindows() приватный Метод

private EnumDesktopWindows ( IntPtr hDesktop, EnumDelegate lpEnumCallbackFunction, IntPtr lParam ) : bool
hDesktop System.IntPtr
lpEnumCallbackFunction EnumDelegate
lParam System.IntPtr
Результат bool
Пример #1
0
        /// <summary>
        /// Synchronously enumerates windows and returns a window list
        /// </summary>
        /// <returns>list of windows</returns>
        public static List <WindowInfo> Enumerate(bool excludeThisProcess = true)
        {
            _currentProcess     = Process.GetCurrentProcess();
            _excludeThisProcess = excludeThisProcess;
            _shellWindowHandle  = User32Interop.GetShellWindow();

            windowList = new List <WindowInfo>();
            User32Interop.EnumDesktopWindows(IntPtr.Zero, enumWindowsCallback, IntPtr.Zero);

            return(windowList);
        }
Пример #2
0
 /// <summary>
 /// Synchronously enumerates windows and returns a window list
 /// </summary>
 /// <returns>list of windows</returns>
 public static List <WindowInfo> Enumerate()
 {
     windowList = new List <WindowInfo>();
     User32Interop.EnumDesktopWindows(IntPtr.Zero, enumWindowsCallback, IntPtr.Zero);
     return(windowList);
 }