Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enumerate all windows within a process?

I need to capture particular windows of 3rd party process. I can find main window handle as Process.MainWindowHandle, but what I can use to list other windows?

I am using C# / .NET

like image 981
st78 Avatar asked Feb 17 '10 14:02

st78


People also ask

What are the functions used to enumerate processes?

The following functions are used to enumerate processes. Retrieves the process identifier for each process object in the system. Retrieves information about the first process encountered in a system snapshot.

What is process enumeration in Linux?

Process Enumeration. All users have read access to the list of processes in the system and there are a number of different functions that enumerate the active processes. The function you should use will depend on factors such as desired platform support.

How to enumerate child windows using enumwindows?

Documentation of Windows (dunno its accuracy) says that EnumWindows only enumerates top level windows. If you wish to enumerate child windows, you need to use EnumChildWindows function where you have to pass handle of parent window

How to check which process each window belongs to?

Use the Win32 API EnumWindows (and if you want EnumChildWindows) Then check which process each window belongs to by using the Win32 API GetWindowThreadProcessId


1 Answers

.NET (C#): Getting child windows when you only have a process handle or PID?

like image 142
Svetlozar Angelov Avatar answered Oct 14 '22 07:10

Svetlozar Angelov