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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DLL in memory

DLL in memory

Scheduled Pinned Locked Moved C / C++ / MFC
performancequestion
12 Posts 5 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.
  • R RomTibi

    Can a DLL loaded into a memory table be used like a DLL into a file with LoadLibrary()?

    36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

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

    Are you wanting to know the difference between implicit and explicit linking?

    "One man's wage rise is another man's price increase." - Harold Wilson

    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

    "Man who follows car will be exhausted." - Confucius

    R 1 Reply Last reply
    0
    • R RomTibi

      Can a DLL loaded into a memory table be used like a DLL into a file with LoadLibrary()?

      36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #3

      LoadLibrary requires the DLL to be on the disk. So you will need to write the contents of the memory to a disk file and then call LoadLibrary on it.

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      R 1 Reply Last reply
      0
      • R RomTibi

        Can a DLL loaded into a memory table be used like a DLL into a file with LoadLibrary()?

        36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

        I Offline
        I Offline
        Intersect
        wrote on last edited by
        #4

        Yes. you can load one DLL into System Memory.

        R 1 Reply Last reply
        0
        • D David Crow

          Are you wanting to know the difference between implicit and explicit linking?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Man who follows car will be exhausted." - Confucius

          R Offline
          R Offline
          RomTibi
          wrote on last edited by
          #5

          I think I don't understand. The problem is that I want to avoid LoadLibrary().

          36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

          D 1 Reply Last reply
          0
          • _ _Superman_

            LoadLibrary requires the DLL to be on the disk. So you will need to write the contents of the memory to a disk file and then call LoadLibrary on it.

            «_Superman_» I love work. It gives me something to do between weekends.
            Microsoft MVP (Visual C++)

            R Offline
            R Offline
            RomTibi
            wrote on last edited by
            #6

            See the reply to David Crow

            36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

            1 Reply Last reply
            0
            • I Intersect

              Yes. you can load one DLL into System Memory.

              R Offline
              R Offline
              RomTibi
              wrote on last edited by
              #7

              How?

              36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

              1 Reply Last reply
              0
              • R RomTibi

                I think I don't understand. The problem is that I want to avoid LoadLibrary().

                36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

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

                RomTibi wrote:

                The problem is that I want to avoid LoadLibrary().

                Then you must link implicitly.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Man who follows car will be exhausted." - Confucius

                R 1 Reply Last reply
                0
                • D David Crow

                  RomTibi wrote:

                  The problem is that I want to avoid LoadLibrary().

                  Then you must link implicitly.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Man who follows car will be exhausted." - Confucius

                  R Offline
                  R Offline
                  RomTibi
                  wrote on last edited by
                  #9

                  I think I don't know the difference between implicit and explicit. I think I need an example.

                  36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

                  D 1 Reply Last reply
                  0
                  • R RomTibi

                    I think I don't know the difference between implicit and explicit. I think I need an example.

                    36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

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

                    RomTibi wrote:

                    I think I need an example.

                    Google is your friend. See here.

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "Man who follows car will be exhausted." - Confucius

                    R 1 Reply Last reply
                    0
                    • D David Crow

                      RomTibi wrote:

                      I think I need an example.

                      Google is your friend. See here.

                      "One man's wage rise is another man's price increase." - Harold Wilson

                      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                      "Man who follows car will be exhausted." - Confucius

                      R Offline
                      R Offline
                      RomTibi
                      wrote on last edited by
                      #11

                      Thanks! I've a lot to learn! ...yet... :)

                      36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

                      1 Reply Last reply
                      0
                      • R RomTibi

                        Can a DLL loaded into a memory table be used like a DLL into a file with LoadLibrary()?

                        36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War

                        S Offline
                        S Offline
                        Stephen Hewitt
                        wrote on last edited by
                        #12

                        Firstly, it's far from clear what you mean by "loaded into a memory table". It sounds like your want to re-implement the loader. In general I'm not sure if this is possible from user mode. There's a lot more to getting a module into memory in a executable state then simply having the module in memory: relocating, recursively loading all dependent modules, resolving imports (building the Import Address Table, for example), etc... Even if you did do all these things (and more that I've forgotten) it's far from clear that "unusual" things, for example code that enumerated all loaded modules, would work.

                        Steve

                        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