Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Who good C#?

Status
Not open for further replies.
Initiate Mage
Joined
Sep 14, 2013
Messages
5
Reaction score
0
I want to write a small program to read a file, from offset 0xFB650 to offset 0xFB656 and show value in a text box.
Who can help me?
 
Skilled Illusionist
Joined
Jul 10, 2008
Messages
371
Reaction score
94


all is here for binary reading for offset just ignore the offset first byte of the file.
 
Initiate Mage
Joined
Dec 16, 2011
Messages
54
Reaction score
26
BinaryReader bin = new BinaryReader();
byte[] bytes = new bytes[0xFB656 - 0xFB650];
bin.Read(bytes, 0xFB650, bytes.Length);

i just made it from my head, i dont give guarantee that this works.
 
Last edited:
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
my god let him have the research....
He wont learn it just by copy and paste code lines, you write to him.

Also, I think what he needs, is the Seek method of the FileStream Class in combination with some methods of the BinaryReader Class...
 
Junior Spellweaver
Joined
Dec 3, 2012
Messages
162
Reaction score
130
Code:
      private void Form1_Load(object sender, EventArgs e)
        {
            string path = @"C:\test.bin";
            using (FileStream fs = File.OpenRead(path))
            {
                byte[] b = new byte[6];
                UTF8Encoding temp = new UTF8Encoding(true);
                fs.Position = 0xFB650;
                fs.Read(b, 0, b.Length);               
                textBox1.Text = temp.GetString(b);
                fs.Close();   
            }
            
        }

:lol:
 
Status
Not open for further replies.
Back
Top