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. VC6: How do I execute an exe contained in my resources?

VC6: How do I execute an exe contained in my resources?

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
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.
  • T Offline
    T Offline
    tssyf
    wrote on last edited by
    #1

    I'm trying to write a program with visual C++ 6 and I'm wanting to execute an exe file that's contained in my resources. How do I do this?

    G H 2 Replies Last reply
    0
    • T tssyf

      I'm trying to write a program with visual C++ 6 and I'm wanting to execute an exe file that's contained in my resources. How do I do this?

      G Offline
      G Offline
      Gerald Schwab
      wrote on last edited by
      #2
      1. Extract the exe resource to memory. 2) Write it to the filesystem. 3) Call CreateProcess(). http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp[^] 4) Optionally delete the exe from the filesystem after CreateProcess has been called.
      T 1 Reply Last reply
      0
      • G Gerald Schwab
        1. Extract the exe resource to memory. 2) Write it to the filesystem. 3) Call CreateProcess(). http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp[^] 4) Optionally delete the exe from the filesystem after CreateProcess has been called.
        T Offline
        T Offline
        tssyf
        wrote on last edited by
        #3

        Thanks for that. Another question: How do I write code to access the resource?

        G 1 Reply Last reply
        0
        • T tssyf

          Thanks for that. Another question: How do I write code to access the resource?

          G Offline
          G Offline
          Gerald Schwab
          wrote on last edited by
          #4

          http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/introductiontoresources/resourcereference/resourcefunctions/loadresource.asp?frame=true[^]

          1 Reply Last reply
          0
          • T tssyf

            I'm trying to write a program with visual C++ 6 and I'm wanting to execute an exe file that's contained in my resources. How do I do this?

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            You can see an article of Mr David Crow about resource on codeproject maybe its some helpful for you


            WhiteSky


            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