Read the entire file into a buffer. Close the file. Find the text that you're looking for inside the buffer and remove it. Reopen the file for writing. Dump the buffer into the file.
Get a handle with [red]CreateFile()[/red]
then move the file pointer with [red]SetFilePointer()[/red]to where you want to chop off the remaining bytes
then do [red]SetEndOfFile()[/red] on the handle
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.