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. Listing Thread Module Names and Base Addresses

Listing Thread Module Names and Base Addresses

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
6 Posts 4 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.
  • A Offline
    A Offline
    Abhishek Karnik
    wrote on last edited by
    #1

    Hey, I have a program that lists processes running on the system. For each Process I can get the Thread IDs of all the threads running in that process... Is it possible for me to use the thread ID for some process X to get that threads Module Name (like a loaded dll it uses) and/or Base address of the execution of that thread ?? Any help here would be appreciated. Thanks, Abhishek

    A 1 Reply Last reply
    0
    • A Abhishek Karnik

      Hey, I have a program that lists processes running on the system. For each Process I can get the Thread IDs of all the threads running in that process... Is it possible for me to use the thread ID for some process X to get that threads Module Name (like a loaded dll it uses) and/or Base address of the execution of that thread ?? Any help here would be appreciated. Thanks, Abhishek

      A Offline
      A Offline
      Arman S
      wrote on last edited by
      #2

      Hi, You need to use ToolHelp stuff. See: MODULENTRY32 Module32First Module32Next IMAGE_DOS_HEADER IMAGE_NT_HEADER ToolHelp32ReadProcessMemory -- ====== Arman

      A A 2 Replies Last reply
      0
      • A Arman S

        Hi, You need to use ToolHelp stuff. See: MODULENTRY32 Module32First Module32Next IMAGE_DOS_HEADER IMAGE_NT_HEADER ToolHelp32ReadProcessMemory -- ====== Arman

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Hey Arman, thanks for your reply... I have been using Thread32 and Process32 functions....how different would those be from Module32 .... What information must I give the module ? Abhishek

        1 Reply Last reply
        0
        • A Arman S

          Hi, You need to use ToolHelp stuff. See: MODULENTRY32 Module32First Module32Next IMAGE_DOS_HEADER IMAGE_NT_HEADER ToolHelp32ReadProcessMemory -- ====== Arman

          A Offline
          A Offline
          Abhishek Karnik
          wrote on last edited by
          #4

          Hey, I had a look at the Module Function.....it gives me a list of the Modules that are being used by the process.....More specifically I need to find the start address of where a thread begins execution. So I have a list of Threads .... how do I know the baseAddress of where they begin execution. I don't know if you've used process explorer....When you right click on a process in Process Explorer and select properties, it pops up a tabbed window........Clicking on "Threads " in that window we get a listing of Threads for the process in the form of Module!function....which basically gives the "Thread Start Address" and module name. Regards :), Abhishek

          R 1 Reply Last reply
          0
          • A Abhishek Karnik

            Hey, I had a look at the Module Function.....it gives me a list of the Modules that are being used by the process.....More specifically I need to find the start address of where a thread begins execution. So I have a list of Threads .... how do I know the baseAddress of where they begin execution. I don't know if you've used process explorer....When you right click on a process in Process Explorer and select properties, it pops up a tabbed window........Clicking on "Threads " in that window we get a listing of Threads for the process in the form of Module!function....which basically gives the "Thread Start Address" and module name. Regards :), Abhishek

            R Offline
            R Offline
            Robert M Greene
            wrote on last edited by
            #5

            Have you checked the www.sysinternals.com website? I know they have process explorer there, not sure if they have source code for it or not. ............................. There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life. Fiat justitia, et ruat cælum

            A 1 Reply Last reply
            0
            • R Robert M Greene

              Have you checked the www.sysinternals.com website? I know they have process explorer there, not sure if they have source code for it or not. ............................. There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life. Fiat justitia, et ruat cælum

              A Offline
              A Offline
              Abhishek Karnik
              wrote on last edited by
              #6

              hey, I don't think sysinternals has the code for ProcessExplorer....... Thanks

              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