Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Retrieving a processes STARTINFO (or desktop)

Retrieving a processes STARTINFO (or desktop)

Scheduled Pinned Locked Moved C / C++ / MFC
comtoolshelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nnamdi Onyeyiri
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • N Nnamdi Onyeyiri

      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

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      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

      N 1 Reply Last reply
      0
      • D David Crow

        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

        N Offline
        N Offline
        Nnamdi Onyeyiri
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups