D
Donald Oakes
I'm experiencing some problems with the
System.Diagnostic.Process.MainWindowTitle property when
accessed from a Window's Service running on XP Pro.
The following code:
foreach (Process process in Process.GetProcesses())
{
Console.Write(process.ProcessName + " : " +
process.MainWindowTitle + "\n");
}
works fine from a console application. But
MainWindowTitle is always an empty string when this
snippet is run from within my Windows Service (also
MainWindowHandle is always returning zero, even for
processes with a graphical interface).
Any advice would be greatly appreciated.
System.Diagnostic.Process.MainWindowTitle property when
accessed from a Window's Service running on XP Pro.
The following code:
foreach (Process process in Process.GetProcesses())
{
Console.Write(process.ProcessName + " : " +
process.MainWindowTitle + "\n");
}
works fine from a console application. But
MainWindowTitle is always an empty string when this
snippet is run from within my Windows Service (also
MainWindowHandle is always returning zero, even for
processes with a graphical interface).
Any advice would be greatly appreciated.