VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Successfully Open a Binary File, Read its Contents, and Output it as a Binary File, 10 Lines of Cod

by Anaru Hartley (3 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 21st August 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Successfully Open a Binary File, Read its Contents, and Output it as a Binary File, 10 Lines of Code (not including Comments).

Rate Successfully Open a Binary File, Read its Contents, and Output it as a Binary File, 10 Lines of Cod



Dim s As String
'--------------
Open "c:\original.exe" For Binary As 1
Open "c:\clone.exe" For Binary As 2
'-------------------------------------
l = LOF(1) 'Length of File
s = String(l, vbNullChar)
'-------------------------
Get 1, , s
Put 2, , s
'---------
Close 1
Close 2

Download this snippet    Add to My Saved Code

Successfully Open a Binary File, Read its Contents, and Output it as a Binary File, 10 Lines of Cod Comments

No comments have been posted about Successfully Open a Binary File, Read its Contents, and Output it as a Binary File, 10 Lines of Cod. Why not be the first to post a comment about Successfully Open a Binary File, Read its Contents, and Output it as a Binary File, 10 Lines of Cod.

Post your comment

Subject:
Message:
0/1000 characters