HEX edit files

This is a discussion on HEX edit files within the C Programming forums, part of the General Programming Boards category; HEX edit files I wanna open file for Hex editing and goto some adress in file like 0x235 or 00000235 ...

  1. #1
    Registered User xxxrugby's Avatar
    Join Date
    Jan 2005
    Posts
    178

    HEX edit files

    HEX edit files
    I wanna open file for Hex editing and goto some adress in file like 0x235 or 00000235
    And there I wanna change it's value to lets say FF.
    Sorry for spelling errors, not English!
    xxxrugby: "All Human Race Will Die From My Hand!"
    xxxrugby: "We are all philosophers, when question is about politics!"

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,765
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User xxxrugby's Avatar
    Join Date
    Jan 2005
    Posts
    178
    I have HEY editor. But I wanna chage something in file. That's always on same adess. And there I wanna change value.!
    So I dont wanna open Hex editor every time. I just wanna start that exe file and he will open that file and modife it.!
    Sorry for spelling errors, not English!
    xxxrugby: "All Human Race Will Die From My Hand!"
    xxxrugby: "We are all philosophers, when question is about politics!"

  4. #4
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,171
    Code:
    #include <stdio.h>
    
    int main(void)
    {
      FILE *fp;
      unsigned char newval = 0xFF;
    
      if(!(fp = fopen("trash.bin", "rb+")))
      {
        puts("Couldn't open trash.bin!");
        return 1;
      }
    
      fseek(fp, 0x234, SEEK_SET);
      fwrite(&newval, 1, 1, fp);
      fclose(fp);
    
      return 0;
    }
    If you understand what you're doing, you're not learning anything.

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,765
    I wanna wanna wanna close this thread.
    Man, what a fsjking stupid questuin - wahat sort of a ansa didya expect?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,171
    Quote Originally Posted by Salem
    I wanna wanna wanna close this thread.
    Man, what a fsjking stupid questuin - wahat sort of a ansa didya expect?
    Why's that? Aren't you interested in finding out what a "HEY editor" is?
    Quote Originally Posted by xxxrugby
    Sorry for spelling errors, not English!
    Typos have nothing to do with speaking English natively and you typo something fierce. Try proofreading what you type. Or do you just kind of throw your fingers at the keyboard and hope something coherent comes out?
    Last edited by itsme86; 08-31-2005 at 01:39 PM.
    If you understand what you're doing, you're not learning anything.

  7. #7
    Registered User xxxrugby's Avatar
    Join Date
    Jan 2005
    Posts
    178
    Thanks itsme for code.! I forgot to read.!
    Sorry for spelling errors, not English!
    xxxrugby: "All Human Race Will Die From My Hand!"
    xxxrugby: "We are all philosophers, when question is about politics!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Deployment and DLL/OCX Files?
    By dfghjk in forum C++ Programming
    Replies: 5
    Last Post: 06-16-2008, 03:47 AM
  2. using c++ to edit txt files
    By trescenzi in forum C++ Programming
    Replies: 2
    Last Post: 12-28-2006, 08:54 PM
  3. How can I edit .dll files?
    By leskitten in forum C++ Programming
    Replies: 9
    Last Post: 07-29-2002, 04:16 PM
  4. Using c++ standards
    By subdene in forum C++ Programming
    Replies: 4
    Last Post: 06-06-2002, 10:15 AM
  5. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 09:35 AM

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