(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-09-24 12:45 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Increasing a file's size in Vb6
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
Sukasa
Posts: 788/2068
just write past the EOF. I did that in binary with my own code, without using byte arrays or anything. it worked fine.
wboy
Posts: 9/15
In addition to Mega-dog's post, simply...

Load the binary file into a byte array.

Increase the size fo the the array keeping the currently stored values:
ReDim Preserve bytArray(0 To lngNewFileSize)

Save the file.
Mega-Dog
Posts: 34/72
will if you are opening the file for binary it will work just extend your array size and write it.
dcahrakos
Posts: 370/499
I believe you can use append if its text, but since its for a rom editor, I cant imagine it is, although ive never tried append with binary files, it might work if done right.

Append opens and goes to the end of the file to start writing instead of starting at the beginning.
D 2007
Posts: 134/497
Writing past the end-of-file works.

At least in QBASIC. Not sure about later, but I'd imagine it was the same.
interdpth
Posts: 78/362
So anyone know how to increase a file size? It's for my ROM editor so would any one mind helping?
Acmlm's Board - I3 Archive - Programming - Increasing a file's size in Vb6


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.010 seconds; used 345.30 kB (max 382.83 kB)