S
sky30
Guest
Hi,
i try to build up for a project a simple task manager view, the offical windows task manager have a speration between app, backgroup processes and windows processes. I have found on Microsoft devblog (How does Task Manager categorize processes as App, Background Process, or Windows Process? | The Old New Thing): If the process has a visible window, then Task Manager calls it an “App”.
With the following code i catch all processes with a visible window:
EnumWindows([](HWND hwnd, LPARAM lparam) -> BOOL {
auto vi_list = reinterpret_cast<std::vector<DWORD>*>(lparam);
DWORD dw_id;
GetWindowThreadProcessId(hwnd, &dw_id);
if ((bool)IsWindowVisible(hwnd)) {
(*vi_list).push_back(dw_id);};
return TRUE;
}, LPARAM(&vi_win_list));
If i make a short test (for example on firefox.exe), the task manager shows me 7 firefox.exe processes under apps and 3 firefox.exe process under background processes. In my test i have only one firefox.exe process (with a visible window) and 9 background processes. Is the information regarding apps sign wrong or my function?
Continue reading...
i try to build up for a project a simple task manager view, the offical windows task manager have a speration between app, backgroup processes and windows processes. I have found on Microsoft devblog (How does Task Manager categorize processes as App, Background Process, or Windows Process? | The Old New Thing): If the process has a visible window, then Task Manager calls it an “App”.
With the following code i catch all processes with a visible window:
EnumWindows([](HWND hwnd, LPARAM lparam) -> BOOL {
auto vi_list = reinterpret_cast<std::vector<DWORD>*>(lparam);
DWORD dw_id;
GetWindowThreadProcessId(hwnd, &dw_id);
if ((bool)IsWindowVisible(hwnd)) {
(*vi_list).push_back(dw_id);};
return TRUE;
}, LPARAM(&vi_win_list));
If i make a short test (for example on firefox.exe), the task manager shows me 7 firefox.exe processes under apps and 3 firefox.exe process under background processes. In my test i have only one firefox.exe process (with a visible window) and 9 background processes. Is the information regarding apps sign wrong or my function?
Continue reading...