Click here to Skip to main content
16,008,490 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: urgent!! please respond by e-mail Pin
Matt Gullett27-Jul-01 11:24
Matt Gullett27-Jul-01 11:24 
General32bit color icons and user break points Pin
Douglas Troy27-Jul-01 9:40
Douglas Troy27-Jul-01 9:40 
GeneralRe: 32bit color icons and user break points Pin
Tomasz Sowinski29-Jul-01 23:33
Tomasz Sowinski29-Jul-01 23:33 
GeneralRe: 32bit color icons and user break points Pin
Douglas Troy30-Jul-01 5:23
Douglas Troy30-Jul-01 5:23 
GeneralCalculate a Checksum Pin
youssef27-Jul-01 8:13
youssef27-Jul-01 8:13 
GeneralRe: Calculate a Checksum Pin
PJ Arends27-Jul-01 9:46
professionalPJ Arends27-Jul-01 9:46 
GeneralRe: Calculate a Checksum Pin
Joe Moldovan27-Jul-01 13:40
Joe Moldovan27-Jul-01 13:40 
GeneralRead/write from a binary file @ specified offsets Pin
27-Jul-01 7:20
suss27-Jul-01 7:20 
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 to do this bit of the programme, 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);


================================================
Sample code is appreciated Smile | :)

Best regards,
Richard Edwards
GeneralRe: Read/write from a binary file @ specified offsets Pin
Carlos Antollini27-Jul-01 8:18
Carlos Antollini27-Jul-01 8:18 
GeneralRe: Read/write from a binary file @ specified offsets Pin
Chris Losinger27-Jul-01 8:20
professionalChris Losinger27-Jul-01 8:20 
GeneralRe: Read/write from a binary file @ specified offsets Pin
31-Jul-01 9:58
suss31-Jul-01 9:58 
GeneralCListView Not cooperating... Pin
Joseph Dempsey27-Jul-01 6:12
Joseph Dempsey27-Jul-01 6:12 
GeneralRe: CListView Not cooperating... Pin
Matt Gullett27-Jul-01 6:20
Matt Gullett27-Jul-01 6:20 
GeneralRe: CListView Not cooperating... Pin
Diarrhio28-Jul-01 3:21
Diarrhio28-Jul-01 3:21 
GeneralCross Class Functions Pin
Matt Newman27-Jul-01 5:50
Matt Newman27-Jul-01 5:50 
GeneralRe: Cross Class Functions Pin
Chris Losinger27-Jul-01 5:53
professionalChris Losinger27-Jul-01 5:53 
GeneralRe: Cross Class Functions Pin
Matt Newman27-Jul-01 6:04
Matt Newman27-Jul-01 6:04 
GeneralRe: Cross Class Functions Pin
Chris Losinger27-Jul-01 7:05
professionalChris Losinger27-Jul-01 7:05 
GeneralRe: Cross Class Functions Pin
Matt Newman27-Jul-01 8:23
Matt Newman27-Jul-01 8:23 
GeneralPLEASE HELP !!!! URGENT !!!!!!!!!! save struct in file Pin
27-Jul-01 5:09
suss27-Jul-01 5:09 
GeneralRe: PLEASE HELP !!!! URGENT !!!!!!!!!! save struct in file Pin
Joaquín M López Muñoz27-Jul-01 5:37
Joaquín M López Muñoz27-Jul-01 5:37 
Questionproblem with SetActiveView( , ),,?????? Pin
mr200327-Jul-01 4:40
mr200327-Jul-01 4:40 
AnswerRe: problem with SetActiveView( , ),,?????? Pin
Tomasz Sowinski27-Jul-01 4:50
Tomasz Sowinski27-Jul-01 4:50 
GeneralRe: problem with SetActiveView( , ),,?????? Pin
mr200327-Jul-01 6:06
mr200327-Jul-01 6:06 
GeneralRe: problem with SetActiveView( , ),,?????? Pin
Matt Gullett27-Jul-01 6:14
Matt Gullett27-Jul-01 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.