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. Executing an EXE from memory

Executing an EXE from memory

Scheduled Pinned Locked Moved C / C++ / MFC
performancequestion
4 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.
  • L Offline
    L Offline
    Larry Antram
    wrote on last edited by
    #1

    I would like to execute an EXE from memory (instead of disk). Is this practical? If so, does anyone have any hints or suggestions as to how it can be accomplished?

    D M 2 Replies Last reply
    0
    • L Larry Antram

      I would like to execute an EXE from memory (instead of disk). Is this practical? If so, does anyone have any hints or suggestions as to how it can be accomplished?

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

      Yes. Search MSDN and the Net for the PE file format.


      Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

      L 1 Reply Last reply
      0
      • D David Crow

        Yes. Search MSDN and the Net for the PE file format.


        Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

        L Offline
        L Offline
        Larry Antram
        wrote on last edited by
        #3

        I undoubtably have horrible MSDN searching skills, however the most I gleaned from a massive article with way too much information I'm not interested in was: "When PE files are loaded into memory via the Windows loader"... bla bla bla. I'm just wondering if there is some relatively easy way (in the Win32/C++ world) to launch a PE from memory (instead of disk)? From disk we have lots of API's... WinExec, CreateProcess, ShellExecute, etc. What's the basic technique for launching from memory? Is assembly required? :confused: I'm just basically looking for a tidbit of information to give me a headstart -- before having to comprehend all of the information about PE files and apparently the Windows loader and such.

        1 Reply Last reply
        0
        • L Larry Antram

          I would like to execute an EXE from memory (instead of disk). Is this practical? If so, does anyone have any hints or suggestions as to how it can be accomplished?

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          Larry Antram wrote: I would like to execute an EXE from memory No, because the PE loader uses memory-mapped files to move the EXE image into memory. This requires that the EXE be a real file on disk. --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber CP SearchBar v2.0.2 released

          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