Here is some sample code from the library i am writing to read and
modify these blocks. Can't yet write the changes out to file, Plan on
working on that next. Although the struct does store everything in an
easily writable format, Just need to plop all variables back into a
1024 byte array and write it out to the last 1024 bytes of the file.
I'll upload the code when its complete.
MLHeader test = new MLHeader("test.rc2");
Console.WriteLine("Magic: 0x{0}",
BitConverter.ToString(BitConverter.GetBytes(test.meb.magic)).Replace("-",
""));
Console.WriteLine("Flash Address: 0x{0}",
BitConverter.ToString(BitConverter.GetBytes(test.meb.flashAddress)).Replace("-",
""));
test.meb.flashAddress = 0x4b00000;
Console.WriteLine("Flash Address: 0x{0}",
BitConverter.ToString(BitConverter.GetBytes(test.meb.flashAddress)).Replace("-",
""));
Console.WriteLine("Phone Model: {0}",
test.meb.PhoneModel);
test.meb.PhoneModel = "TEST";
Console.WriteLine("Phone Model: {0}",
test.meb.PhoneModel);
Console.WriteLine("File Type: {0}", test.meb.ImageType);
test.meb.ImageType = "TST";
Console.WriteLine("File Type: {0}", test.meb.ImageType);
Console.ReadLine();