ITKnightMare
asked on
(URGENT) Which way of saving a string to file is faster?
filenum = FreeFile
Open "C:\bleeh.jpg" For Output As #filenum
Print #filenum, Myjpegcontentsasstring
Close #filenum
End If
OR
The textstream object with the FileSystemObject in scripting.runtime?
Also if someone would give me the code for TextSteam way of doing it I would appreciate it. If indeed that's faster of course.
OR
Perhaps some other way to save a string into file in VB6 that is faster than all the other ways?
It's URGENT so 500 points is well deserved for the fastest correct answer :)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think you didn't show us the whole code.
ASKER
for i = 0 to 39
filenum = FreeFile
Open "C:\bleeh" & i & ".jpg" For Output As #filenum
Print #filenum, Myjpegcontentsasstring(i)
Close #filenum
End If
next i
filenum = FreeFile
Open "C:\bleeh" & i & ".jpg" For Output As #filenum
Print #filenum, Myjpegcontentsasstring(i)
Close #filenum
End If
next i
ASKER
Well I ended up using the output way, thanks for trying anway.
ASKER
filenum = FreeFile
Open "C:\bleeh.jpg" For Output As #filenum
Print #filenum, Myjpegcontentsasstring
Close #filenum
End If
way for around 40 different strings to be saved, it eats up like 100% of the CPU and takes a noticably slow time?
Are we sure there isn't a faster way of saving a string content to file? Perhaps an API call which always end up being faster?