I'm opening files in Binary and have a problem here: How do I remove characters from the end of the file, In other word, reduce the file length. Currently I'm deleting the whole file and replacing it with the left content. Is there any other ways of doing this?

Also, how do I get a memory pointer using StringFromPointer or any other API?

Any Help will be appreciated.