Binary file read problem

rashmi

Member
Joined
Mar 16, 2006
Messages
6
Programming Experience
Beginner
I am using following code to write string in binary file

HTML:
 Dim temp As New IO.FileStream("C:\steg\2.jpg", FileMode.Open, FileAccess.ReadWrite)
        Dim iobx As New IO.BinaryReader(temp)
        Dim i As Long
        Dim x() As Byte


        For i = 1 To temp.Length
            x = iobx.ReadBytes(256)
            i = temp.Position - 1
        Next
        iobx.Write("Password")

So I mean at the end of file i am adding text "Password"

Now I want to see in any file whether I have writtin "Password" or not. If its not written there msgbox should be displayed no.

Can anyone tell me how can I compare string from binary file?
 
Back
Top