My company is using an unfortunate third party product that requires a user to be left logged on to an XP workstation running two instances of it\'s product.
I was t
using System.Runtime.InteropServices;
using System.Text;
...
[DllImport("user32.dll")]
static extern int GetWindowText(int hWnd, StringBuilder text, int count);
...
Process[] processList = Process.GetProcesses();
List windowTitles = new List();
foreach (Process proc in processList)
{
StringBuilder Buff = new StringBuilder(256);
if (GetWindowText(proc.MainWindowHandle.ToInt32(), Buff, 256) > 0 )
{
windowTitles.Add(Buff.ToString());
}
}