I hope one of you can help me to figure this out, because i can't. I want to read the last 128 bytes out of a file. Because of this I call the createfile function, then I use getfilesize and sub 128 from the filesize. Now i have got the offset where to start the reading. But is there a chance of reading the opened file from this special position ? sign CyBerian
Posted on 2001-03-11 09:41:00 by CyBerian
in my opinion this is the only and best solution.
Posted on 2001-03-11 09:55:00 by [SaFc0n]
Sorry I think you understood my question wrong. I will ask it again, because I think it was some kind of bad formulated. I don't know how to start the read at this special position. And I hope you can give me an example. How is it done (using ReadFile ?) But if I use ReadFile where can I set the start of the read? sign CyBerian
Posted on 2001-03-11 10:08:00 by CyBerian
You need to do something like this: invoke SetFilePointer,hFile,CalculatedOffset,NULL,FILE_BEGIN
Posted on 2001-03-11 11:02:00 by martin
thx. I just found this API some minutes ago. anyway thx. sign CyBerian This message was edited by CyBerian, on 3/11/2001 12:27:54 PM
Posted on 2001-03-11 11:26:00 by CyBerian
You can save the calculation by using:
invoke SetFilePointer, hFile, 128, NULL, FILE_END
Thomas
Posted on 2001-03-11 13:24:00 by Thomas
hmmm yeah that's a good idea thx. sign CyBerian
Posted on 2001-03-11 15:33:00 by CyBerian