/// <summary> /// Returns an array of all open windows and their hWnds /// </summary> public WindowArray() { GCHandle gch = GCHandle.Alloc(this); EnumWindowsCB ewcb = new EnumWindowsCB(MyEnumWindowsCB); EnumWindows(ewcb, (IntPtr)gch); gch.Free(); }
public static extern bool EnumWindows(EnumWindowsCB callback, IntPtr lParam);
private static extern int EnumWindows(EnumWindowsCB cb, IntPtr param);
public static extern int EnumWindows(EnumWindowsCB cb, int lparam);