|
-
Apr 29th, 2006, 08:26 AM
#1
Thread Starter
New Member
cant read large file
Hi all,
i am writting an application where i need to read files from different locations of hard disk.My application can read files of size upto 10 MB but fails to read if the file size is more than that and my system hangs. I am using win98 and VB 6.0.
PLz help me to work around.
####################################################
########this is the portion of the code where the system hangs#######
F = FreeFile
Open sArchiv For Binary As #F
Put #F, , nFiles
For i = 1 To nFiles
nLenFileName = Len(File(i))
Put #F, , nLenFileName
Put #F, , File(i)
n = FreeFile
FileNameFull1 = sPath + File(i)
FileNameFull2 = Left(FileNameFull1, InStrR(FileNameFull1, "\"))
FileNameFull3 = Right(FileNameFull1, Len(FileNameFull1) - InStrR(FileNameFull1, "\"))
Open sPath + File(i) For Binary As #n
FileData = Space$(LOF(n))
Get #n, , FileData
Close #n
nLenFileData = Len(FileData)
Put #F, , nLenFileData
Put #F, , FileData
DoEvents
Next i
Close #F
####################################################
####################################################
Thanks
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
|