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