• 0

Patch File


Question

What i want is:

When i click Button3, turn1.dll in destination folder is automatically moded inside (can be by decimal offset or hexadecimal)

Example: Change 0D to 00 that is in 200300 Offset (Hexadecimal mod)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

All right, so you'll need to write a program that does that using some programming language, compile and run it! :) What are you looking for help with exactly and what technologies (language, libraries, etc) are you using?

Link to comment
Share on other sites

  • 0


const long offset = 200300;
const unsigned char to_write[] = { 0x00 };

FILE * f = fopen("turn1.dll", "rb");

fseek(f, offset, SEEK_SET);

fwrite(to_write, sizeof(unsigned char), sizeof(to_write) / sizeof(to_write[0]), f);

fclose(f);
[/CODE]

I've spent too long coding in C that it was the language I thought of for this, I need to go back to C# and Python!

Usually I wouldn't just give code, but this is such a trivial example in C that I may as well.

Also I'd like to point out this is untested, so make sure it writes the byte at the correct location in your test suite!

Also you will need to add a lot of error handling to this

Link to comment
Share on other sites

  • 0

Someone posted something like this a while back. I wrote a quick patching app not sure where it is but it was uploaded to here with source.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.