|
-
January 31st, 2000, 01:02 PM
#1
Reading a specific part of a file
Is it possible to read just a part of a file, without having to read the entire file. For example, I just need bytes 1700 trough 1800 from myProgram.exe. This is not a database file, nor a ascii file.
Also, when the read is done, the file should be closed so other instances of the program can acces the file anywhere they want.
This is for sending files across a network. It must be possible to send the same file at the same time to multiple receivers, even when someone requests the file when it is already beeing sent to someone else (like 70% complete)
-
January 31st, 2000, 03:36 PM
#2
Re: Reading a specific part of a file
haven't done it before, but maybe you can use something like this :
dim myByte as Byte
dim iFile as Integer
iFile=FreeFile
Open "myfile.dat" for bynary as #iFile
'use seek to position at the desired address
'use input to read the amount of bytes
Close #iFile
i'll give it a try, If I come up with something I'll let ya know... in the mean time, check those functions (input, seek)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|