Dear all

I'm trying to write a VB code to write a binary file. I already did the job but the problem is that an extra 00 byte is always added at the end of the file. I believe the problem is that after I finish writing, the file pointer moves to the next byte... but I'm not sure why this causes 00 to be written

Is there any way not to produce the extra 00 at the end of the file ???

I'm using VB6

Thanks so much.

Recommended Answers

All 2 Replies

Post your code

Thx guys I found the problem.... :)

I defined the variable to be written to the file as Integer. while it should have been defined as byte, as Integer type is restored in two types !!!

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.