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#
  4. (Simple!) C# Modules Question

(Simple!) C# Modules Question

Scheduled Pinned Locked Moved C#
questioncsharp
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.
  • D Offline
    D Offline
    Dave Kerr
    wrote on last edited by
    #1

    Hi All, If I load a dll or exe using a pinvoke call to LoadLibrary, how do I get the handles of all of the dependent modules? I have tried to create a 'Process' object from the PID (acquired via pinvoke and the handle) but this object cannot be used apparently. So is there any way to enumerate the modules related to a handle returned by loadlibrary? Thanks in advance!

    R P D 3 Replies Last reply
    0
    • D Dave Kerr

      Hi All, If I load a dll or exe using a pinvoke call to LoadLibrary, how do I get the handles of all of the dependent modules? I have tried to create a 'Process' object from the PID (acquired via pinvoke and the handle) but this object cannot be used apparently. So is there any way to enumerate the modules related to a handle returned by loadlibrary? Thanks in advance!

      R Offline
      R Offline
      R Giskard Reventlov
      wrote on last edited by
      #2

      Don't cross post questions: you've got this in 'Quick Answers' as well.

      me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven

      D 1 Reply Last reply
      0
      • R R Giskard Reventlov

        Don't cross post questions: you've got this in 'Quick Answers' as well.

        me, me, me "The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!" Larry Niven

        D Offline
        D Offline
        Dave Kerr
        wrote on last edited by
        #3

        I've deleted it from the quick questions section

        1 Reply Last reply
        0
        • D Dave Kerr

          Hi All, If I load a dll or exe using a pinvoke call to LoadLibrary, how do I get the handles of all of the dependent modules? I have tried to create a 'Process' object from the PID (acquired via pinvoke and the handle) but this object cannot be used apparently. So is there any way to enumerate the modules related to a handle returned by loadlibrary? Thanks in advance!

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Why?

          1 Reply Last reply
          0
          • D Dave Kerr

            Hi All, If I load a dll or exe using a pinvoke call to LoadLibrary, how do I get the handles of all of the dependent modules? I have tried to create a 'Process' object from the PID (acquired via pinvoke and the handle) but this object cannot be used apparently. So is there any way to enumerate the modules related to a handle returned by loadlibrary? Thanks in advance!

            D Offline
            D Offline
            Dave Kerr
            wrote on last edited by
            #5

            I received a message asking 'Why' which I think has been deleted. The why is that I would like to present the resources from an exe or dll, but also show the resources in any modules that are loaded. So for example, if you wanted the icons in the windows picture and fax viewer, you see that the process is explorer.exe, but it doesn't contain the resources, it's the shimgvw.dll (from memory) module that contains the resources - so in some cases a recursive search would be useful.

            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