Results 1 to 5 of 5

Thread: Modify the resources in app

  1. #1

    Thread Starter
    New Member Lex Chow's Avatar
    Join Date
    Nov 2001
    Location
    China
    Posts
    11

    Question Modify the resources in app

    Does some body know how to modify the resources in app with API? I really need it.
    ThanX
    ----------------------------------------
    Maybe God wants us to meet a few wrong people before meeting the right one, so that when we finally meet the person, we will know how to be grateful...

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    I know you can fetch the resources from an EXE/DLL/etc with API, but I don't think you can change them.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    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"
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  4. #4
    New Member
    Join Date
    Nov 2001
    Posts
    8
    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.

  5. #5
    New Member
    Join Date
    Nov 2001
    Posts
    8
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width