EnumDesktopWindows() private method

private EnumDesktopWindows ( IntPtr hDesktop, EnumDelegate lpEnumCallbackFunction, IntPtr lParam ) : bool
hDesktop System.IntPtr
lpEnumCallbackFunction EnumDelegate
lParam System.IntPtr
return bool
Esempio n. 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);
        }
Esempio n. 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);
 }