Re: Opening file for Binary
Hmm maybe using the SendMessage API and adding the text to the file. Then Opening it up?
Also what is the use of this? Just because once you have done it once you will have to basically manually remove the data so it will work again.
Re: Opening file for Binary
Quote:
Originally Posted by Hell-Lord
Hmm maybe using the SendMessage API and adding the text to the file. Then Opening it up?
Also what is the use of this? Just because once you have done it once you will have to basically manually remove the data so it will work again.
Umm, I don't think so... That would just be ridiculous. This isn't going to be a one time thing, otherwise that would work.
This is for a freeware game called Apprentice. It's a game that allows you to play Magic the Gathering (collectible card game) online with friends.
It has a large binary file that contains a large database of all the cards. I studied the format of the binary file to understand how it sorted the data.
And now I want to add my my own card. However, to do this I would need to add data to the middle of the file.
(And yes I realize that the new cards I make won't work when I am playing online with someone who doesn't have the same data file as I, so I would have to send them the new data file once I modify it.)
Re: Opening file for Binary
You can't just 'insert' data into the middle, or any other part of the file without overwriting the data that comes after it using the standard File I/O.
You need to open the file, modify the contents and save the new data.
There is code for for insert & delete data from within the file here:
http://www.vbforums.com/showthread.p...ghlight=insert