How can I get the name of any process having a visible window - WinAPI?
问题 I'm trying to get the name of processes which have a visible window. For example, if I have Chrome opened, I would like to get the string "chrome.exe", but I only get the init value "unknown" using the code below. I read around it could be an access rights problem, can you suggest me how to change them in order to get the name of processes? DWORD idProc = 0; //pointer to the process which created the window DWORD idThread = GetWindowThreadProcessId(Wnd->get_handle(), &idProc); Wnd->set_pid