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. How tof find the executable name?

How tof find the executable name?

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
5 Posts 3 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.
  • M Offline
    M Offline
    mcgahanfl
    wrote on last edited by
    #1

    Assume note pad is running. The API EnumWindows will return the window title such as "Untitled - Notepad". I am looking for an API that will tell me "notepad.exe" is running. In short I am looking for the same information the task manager displays. thanks

    D N 2 Replies Last reply
    0
    • M mcgahanfl

      Assume note pad is running. The API EnumWindows will return the window title such as "Untitled - Notepad". I am looking for an API that will tell me "notepad.exe" is running. In short I am looking for the same information the task manager displays. thanks

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

      See the Process32First()/Process32Next() pair. There's also EnumProcesses().


      "One must learn from the bite of the fire to leave it alone." - Native American Proverb

      M 1 Reply Last reply
      0
      • M mcgahanfl

        Assume note pad is running. The API EnumWindows will return the window title such as "Untitled - Notepad". I am looking for an API that will tell me "notepad.exe" is running. In short I am looking for the same information the task manager displays. thanks

        N Offline
        N Offline
        Neelesh K J Jain
        wrote on last edited by
        #3

        Try using GetModuleBaseName() or GetModuleFileNameEx() through u can get handle of the process and the file name that is being executed. "Don't forget to rate the reply, if it finds the solution for you".

        M 1 Reply Last reply
        0
        • D David Crow

          See the Process32First()/Process32Next() pair. There's also EnumProcesses().


          "One must learn from the bite of the fire to leave it alone." - Native American Proverb

          M Offline
          M Offline
          mcgahanfl
          wrote on last edited by
          #4

          Thank you

          1 Reply Last reply
          0
          • N Neelesh K J Jain

            Try using GetModuleBaseName() or GetModuleFileNameEx() through u can get handle of the process and the file name that is being executed. "Don't forget to rate the reply, if it finds the solution for you".

            M Offline
            M Offline
            mcgahanfl
            wrote on last edited by
            #5

            Thank you

            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