I want to be able to make is so that when my program loads it checks to see if the bytes in the file are set to something specific. If they are set to a certain byte then carry out the code.
So I want to be able to make it go to a specific byte, check if it's a certain byte and if it is that certain byte then carry out the code else if it is something else then carry out the other code.
I tried this:
Dim bytes As Byte() = New Byte(writeStream.Length) {}
Dim ByteResult As Integer = writeStream.Read(bytes, 30, 1)
MsgBox(ByteResult)
But it didn't work because for some reason it always returned 1.
I also tried this:
Dim dataArray(60) As Byte
If dataArray(30) <> writeStream.ReadByte() - 0 Then
MsgBox("The bytes have been checked.")
End If
But that didn't seem to work either because it never opened the message box for me.
For example, I want it to seek to offset 30 and then check if the byte is 00 then I want it to carry out code 1 and else if it is 01 I want it to carry out code2.
Thanks.