Retrieving a processes STARTINFO (or desktop)
-
Hi. I want to enumerate all of the processes that are running on a particular desktop. Enumerating all processes isnt the problem, its the filtering of them that is causing me trouble. The desktop a process is to run on is specified in the STARTINFO passed to CreateProcess, however, as far as I can see, this is the only place where the desktop is specified, and the only function I can find to retrieve this information is GetStartupInfo, which will only return the STARTUPINFO structure for the calling process. Any ideas?
To those who didn't make it, we will remember you. To those who did :bob: is back. - Megan Forbes in Black Friday
Another Post by NnamdiOnyeyiri -
Hi. I want to enumerate all of the processes that are running on a particular desktop. Enumerating all processes isnt the problem, its the filtering of them that is causing me trouble. The desktop a process is to run on is specified in the STARTINFO passed to CreateProcess, however, as far as I can see, this is the only place where the desktop is specified, and the only function I can find to retrieve this information is GetStartupInfo, which will only return the STARTUPINFO structure for the calling process. Any ideas?
To those who didn't make it, we will remember you. To those who did :bob: is back. - Megan Forbes in Black Friday
Another Post by NnamdiOnyeyiriSo what exactly is your question? If you are not wanting all of the processes that
CreateToolhelp32Snapshot()
provides a list of, what are you wanting to filter on?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
So what exactly is your question? If you are not wanting all of the processes that
CreateToolhelp32Snapshot()
provides a list of, what are you wanting to filter on?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
The desktop they are a part of. One of the memebers of STARTINFO is lpDesktop. If you create a desktop called CP, using CreateDesktop, then set lpDesktop to "CP", when using CreateProcess, the process runs in the CP desktop, so, if your not viewing the CP desktop, you wouldnt see the applications window appear (if it has one). What I can get, is handles to all of the windows in running on the desktop - maybe I can use that to find the processes, and kill them.
To those who didn't make it, we will remember you. To those who did :bob: is back. - Megan Forbes in Black Friday
Another Post by NnamdiOnyeyiri