Guest_imported
New member
- Jan 1, 1970
- 0
Hi there
I'm a Visual C++ newbie and i want to read and write bytes from a file @ specified offsets. Simply how do I do this?
I currently use the following code, but it doesn't let me choose the offset of where I write to, only the value and number of bytes I patch. Please help!!!
==============================================
ofstream path("c:\\windows\\desktop\\debug.dat"
;
char *value_of_patch = "ffff";
int number_of_bytes = 10;
int setmode(int mode = filebuf::binary);
path.setmode(filebuf::binary);
path.write(value_of_patch, number_of_bytes);
================================================
Best regards,
Richard Edwards
I'm a Visual C++ newbie and i want to read and write bytes from a file @ specified offsets. Simply how do I do this?
I currently use the following code, but it doesn't let me choose the offset of where I write to, only the value and number of bytes I patch. Please help!!!
==============================================
ofstream path("c:\\windows\\desktop\\debug.dat"
;
char *value_of_patch = "ffff";
int number_of_bytes = 10;
int setmode(int mode = filebuf::binary);
path.setmode(filebuf::binary);
path.write(value_of_patch, number_of_bytes);
================================================
Best regards,
Richard Edwards