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. How to change other program's resource at runtime

How to change other program's resource at runtime

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

    Any hint about write a program which can change other's program at runtime? Just like this one, it can change the UI of live messenger: http://memskin.fanatic.net.nz[^] This programe looks like implement a loader to load the customized resource, then load the WLM. Does anyone know some details about this or some materials to study? Is it possible to change other program's UI when it's running?

    T 1 Reply Last reply
    0
    • T twomol

      Any hint about write a program which can change other's program at runtime? Just like this one, it can change the UI of live messenger: http://memskin.fanatic.net.nz[^] This programe looks like implement a loader to load the customized resource, then load the WLM. Does anyone know some details about this or some materials to study? Is it possible to change other program's UI when it's running?

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      twomol wrote:

      know some details about this or some materials to study? Is it possible to change other program's UI when it's running?

      Search UpdateResource in MSDN!

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

      T 1 Reply Last reply
      0
      • T ThatsAlok

        twomol wrote:

        know some details about this or some materials to study? Is it possible to change other program's UI when it's running?

        Search UpdateResource in MSDN!

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

        T Offline
        T Offline
        twomol
        wrote on last edited by
        #3

        It seems that this can't work at runtime, This function change the resouce in the image file I want to just change them in memory

        X 1 Reply Last reply
        0
        • T twomol

          It seems that this can't work at runtime, This function change the resouce in the image file I want to just change them in memory

          X Offline
          X Offline
          x87Bliss
          wrote on last edited by
          #4

          I don't believe there are any functions that will allow you to change an images resources in memory. If you're doing a simple replacement, like replacing one bitmap with another, if they are the same size, you can use WriteProcessMemory(...) You can find a whole section in MSDN about the debugging functions. You'll have to find out the memory address of the resource. If you're trying to do more advanced resource changing operations, you're stuck with having to edit the image file; unless you probably do a LOT of work of modifying the PE header and allocating more memory and such, I don't even know if it is technically possible. What kind of resource are you trying to change, and if possible, why? It may be better to come up with a different solution.

          T 1 Reply Last reply
          0
          • X x87Bliss

            I don't believe there are any functions that will allow you to change an images resources in memory. If you're doing a simple replacement, like replacing one bitmap with another, if they are the same size, you can use WriteProcessMemory(...) You can find a whole section in MSDN about the debugging functions. You'll have to find out the memory address of the resource. If you're trying to do more advanced resource changing operations, you're stuck with having to edit the image file; unless you probably do a LOT of work of modifying the PE header and allocating more memory and such, I don't even know if it is technically possible. What kind of resource are you trying to change, and if possible, why? It may be better to come up with a different solution.

            T Offline
            T Offline
            twomol
            wrote on last edited by
            #5

            How about hook the API about loading resource? Memskin(the software I mentioned in first post)'s author said that he use hook to achieve this. Currently I don't have any ideas to do this in detail My purpose is want to make a program to change anohter program's 'skin', so it can be customized to my own taste

            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