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. execute a binary resource without first saving it to disk

execute a binary resource without first saving it to disk

Scheduled Pinned Locked Moved C / C++ / MFC
comhardwarehelptutoriallearning
3 Posts 2 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
    Diddy
    wrote on last edited by
    #1

    Hi there, I am trying to execute a resource embedded in my application, but I dont want to first save it to disk. I know how to do it if I do save it first, using LockResource()/WriteFile()/CreatePocess() etc, but I don't want the user to be able to access the embedded resource without going via my app (i know they could DevStudio/ResourceHacker to extract it manually, but thats not a problem). I have seen http://www.codeproject.com/useritems/launching\_program\_from\_resources.asp on code project, which would seem to be doing what I want, but the link is dead. Thanks

    V 1 Reply Last reply
    0
    • D Diddy

      Hi there, I am trying to execute a resource embedded in my application, but I dont want to first save it to disk. I know how to do it if I do save it first, using LockResource()/WriteFile()/CreatePocess() etc, but I don't want the user to be able to access the embedded resource without going via my app (i know they could DevStudio/ResourceHacker to extract it manually, but thats not a problem). I have seen http://www.codeproject.com/useritems/launching\_program\_from\_resources.asp on code project, which would seem to be doing what I want, but the link is dead. Thanks

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      You can write file to disk and the open it view CreateFile(). Lock it so the user cannot access it. Kuphryn

      D 1 Reply Last reply
      0
      • V valikac

        You can write file to disk and the open it view CreateFile(). Lock it so the user cannot access it. Kuphryn

        D Offline
        D Offline
        Diddy
        wrote on last edited by
        #3

        Thanks - but im trying to avoid that - also because its going to be always run from a CD, and its a rather large resource, i would like to just execute it from ram if thats poss.

        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