Does some body know how to modify the resources in app with API? I really need it.
ThanX :eek:
Printable View
Does some body know how to modify the resources in app with API? I really need it.
ThanX :eek:
I know you can fetch the resources from an EXE/DLL/etc with API, but I don't think you can change them.
It is possible to use a very carefully written program to change the text in an EXE/DLL/etc, but you cannot change images.
However, when changing text, the text must be the same length before and after, so changing "bob" to "joe" is ok but you can't change "bob" to "fred"
There is a good example of this in the Microsoft SDK. Here is some info:
Adding, Deleting, and Replacing Resources
http://msdn.microsoft.com/library/en-us/winui/resource_05yr.asp?frame=true
and here is the url to the examples:
Using Resources
http://msdn.microsoft.com/library/en-us/winui/resource_33n7.asp?frame=true
I'm in the middle of working up a VB translation of these C examples. I hope it's successful ;) It should be done by the end of the day.
A few minutes ago I remembered that updating resources is only possible on a WinNT based machine. If you are using Win95/98/Me then you are probably out of luck.
In the attached zip are two sets of code. The one does a quick enumeration of the resources in an app. I've used Notepad for an example. The UpdateResources() function will take the version info from one app and put it into another app. You have to supply the name of two apps (apps that include version information).
The second set of code, extres.zip, is a good resource enumeration example from Steve McMahon from VBAccelerator. If you want to extend your 'update resource' options to include icons etc then that code will be very helpful.
This is just a quick example of updating resources so if you have any questions, just let me know.