Hi there, I was wondering if there was an easy way to read the first four bytes of a file. The ones in particular I'm looking for are 49 42 53 50
("IBSP") and 46 42 53 50
("FBSP"), but that bit should be easy.
AzraelUK
0
Newbie Poster
Recommended Answers
Jump to PostWhen you say bytes do you really mean the first four bytes or do you mean the first four numbes? I have a suspicion you mean the latter.
Jump to PostTry this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = String.Empty Using fs As New FileStream("c:\test.txt", FileMode.Open) fs.Position = 0 Using br As New BinaryReader(fs) For x As Int16 = 0 To 3 TextBox1.Text &= Asc(br.ReadChar) & " " Next End …
All 6 Replies
iamthwee
AzraelUK
0
Newbie Poster
waynespangler
63
Posting Pro in Training
AzraelUK
0
Newbie Poster
waynespangler
63
Posting Pro in Training
yasserjasem
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.