zunebuggy65
Active member
- Joined
- Oct 12, 2023
- Messages
- 42
- Programming Experience
- 3-5
I am trying to pass a Byte array to a sub, but no matter how I do it, the sub is writing all zeros.
Secondary, less important question. I use Relyze to view my binary files (decompiler). Can anyone recommend something better? It crashes with large files.
Thank you
VB.NET:
Dim myBinArry(2000) As Byte
'Code to fill myBinArry here.
'Verified myBinArry(0) - myBinArry(1999) contain values.
WriteBinaryFile(myFileName, myBinArry)
Private Sub WriteBinaryFile(ByVal myFileName As String, ByVal myBinArry As Byte)
Dim binWrite As BinaryWriter
binWrite = New BinaryWriter(File.Open(myFileName, FileMode.Create))
Using binWrite
For t = 0 To Len(myBinArry) ' I know I should use Ubound and I will as soon as I get passing the Array to work
binWrite.Write(myBinArry(t))
Next
End Using
binWrite.Close()
End Sub
'Result: file is created but it writes only zeros.
Secondary, less important question. I use Relyze to view my binary files (decompiler). Can anyone recommend something better? It crashes with large files.
Thank you
Last edited: