954,558 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Reading a Binary file using Visual Basic

Can anybody help with the attached project ("Binary.zip")

In the folder there is a binary file ("Mazatrol.dat") that I am trying to read. I cannot get the code to work correctly. Can somebody please see if they can update the visual basic project, and tell me what I am doing wrong.

Please see the attachment ("Binary.zip")

Many thanks

Darren (isocam)

Attachments Binary_Files.zip (6.99KB)
isocam
Newbie Poster
4 posts since Dec 2006
Reputation Points: 10
Solved Threads: 0
 

In function cmdReadValues_Click() check that file_length > 0. The file in your zip is an empty file.

Otherwise, I don't see any problems with that program. Just make sure you click the Write button first to generate the file.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

I have attached a new file Called "Binary Files.Zip" this now, contains, the binary file that I want to read/convert. Can somebody please have a quick look at it again, to see if the coding is correct.

Many thanks for your help.

Darren (isocam)

Attachments Binary_Files.zip (13.67KB)
isocam
Newbie Poster
4 posts since Dec 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You