Patching

This is a discussion on Patching within the C++ Programming forums, part of the General Programming Boards category; Now I'm GUESSING that a patch program would save the differences between program A (old) and program B (new), and ...

  1. #1
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    902

    Patching

    Now I'm GUESSING that a patch program would save the differences between program A (old) and program B (new), and then change A accordingly to the changes in B. This would explain for most patches' small size.
    If I'm wrong, tell me what's right. If I'm right, tell me how I'd go about making such a program (not an info file, a program that does it itself).
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    I have tried to build a patch...but I havent got close to finising it yet....

    In an exe, there are different sections.....typically in 1 or more of these sections there's code....there's 1 or more for data....then resources.....then there's imports info and then there's 1 for exports.....etc......(there could be more......just depends)

    It depends what you want to do to in the patch....you could change the section and then put it in a new exe (the patched exe).......replace the section or maybe add a new section and change the direction of the code.......it's dependant on the task at hand......

    Its difficult becase you may find yourself having to mess with the imports table to allow the editied code to run......this can be a major b*tch....

    That's why patches are pretty rare......its easier to ship an updated dll than patch an exe (as log as the new dll doesnt need the exe to be relinked)

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,669
    MOST patches ARE dll's.



    ITSA
    Socket Library!

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by Sebastiani
    MOST patches ARE dll's.

    Yes I know, but what he seemed to be refering to were the old style exe editing patches...at least that's what I though.

  5. #5
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    902
    Well, where would I find ancient tomes of "old style exe patching"?
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  6. #6
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by CodeMonkey
    Well, where would I find ancient tomes of "old style exe patching"?
    Lookup tutorials on the PE file format....there's no real usable tutorial until you know how that works

    Also, you will need some assembler knowledge.....
    Last edited by Fordy; 07-25-2002 at 09:25 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Patching an exe to block 3rd party extractors
    By jmprox in forum Windows Programming
    Replies: 9
    Last Post: 09-24-2008, 11:54 AM
  2. Patching System
    By Puppet Master in forum Game Programming
    Replies: 7
    Last Post: 05-18-2006, 10:12 PM
  3. patching memory in another process
    By 44ffcc in forum Windows Programming
    Replies: 2
    Last Post: 02-06-2006, 08:32 AM
  4. Patching?!
    By Devil Panther in forum Tech Board
    Replies: 12
    Last Post: 11-05-2004, 01:24 PM
  5. Patching a file
    By bEaST in forum C++ Programming
    Replies: 10
    Last Post: 09-21-2003, 01:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21