Ejemplo n.º 1
0
        public static void CloseAllWindowsOfProcess(int processId)
        {
            EnumWindowsCallbackDelegate d = delegate(IntPtr hWnd, UInt32 lParam)
            {
                UInt32 pid;
                ProcessNativeMethods.GetWindowThreadProcessId(hWnd, out pid);
                if ((int)pid == processId)
                {
                    ProcessNativeMethods.PostMessage(hWnd, ProcessNativeConstants.WM_CLOSE, 0, 0);
                }
                return(true);
            };

            ProcessNativeMethods.EnumWindows(d, 0);
        }
Ejemplo n.º 2
0
 private static extern int EnumWindows(EnumWindowsCallbackDelegate callback, IntPtr lParam);
Ejemplo n.º 3
0
 private static extern bool EnumChildWindows(IntPtr hwndParent, EnumWindowsCallbackDelegate lpEnumFunc, IntPtr lParam);
 private static extern int EnumWindows(EnumWindowsCallbackDelegate callback, IntPtr lParam);
Ejemplo n.º 5
0
 public static extern void EnumWindows(EnumWindowsCallbackDelegate d, UInt32 lParam);
 private static extern bool EnumChildWindows(IntPtr hwndParent, EnumWindowsCallbackDelegate lpEnumFunc, IntPtr lParam);
Ejemplo n.º 7
0
 static extern bool EnumWindows(EnumWindowsCallbackDelegate callback, int parameter);
Ejemplo n.º 8
0
 static extern bool EnumChildWindows(IntPtr handle, EnumWindowsCallbackDelegate callback, int parameter);
Ejemplo n.º 9
0
 public static extern int EnumChildWindows(IntPtr hWnd, EnumWindowsCallbackDelegate callback, int lParam);
Ejemplo n.º 10
0
 public static extern int EnumWindows(EnumWindowsCallbackDelegate callback, int lParam);