Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

the old MBF (Microsoft Binary Format) ?

the old MBF (Microsoft Binary Format) ?

the old MBF (Microsoft Binary Format) ?

I've got this problem.  I've got to interface a VB6 program with an old quickbase radom access file that has single precision values stored in the old MBF (microsoft binary format) instead of the new IEEE-32 format.  Well microsoft did make a 16-bit dll that converted them, but that requires VB4 to use it.
 I have three choices (given my level of programming knowledge)
1) find an old copy of VB4 and install it on a W95 machine and write a 16-bit OLE application server for the 16-bit dll.  Then I can call the OLE server from VB6.

2) find someone who can take the source code for the 16-bit dll that is written in C and port it to a 32-bit dll.  It's a very small file on MS website at http://support.microsoft.com/default.aspx?scid=KB;en-us;141939&

3) If I had some documentation on how the MBF works, then I (being a math major) could find a way to do the bit math within a VB6 app myself. I'm pretty sure this would get pretty nasty.  

 I suppose there's one other approach, but I can't think of a way to implement it.  I could write and compile a quickbasic (PDS 7.0) subroutine or program that is capable of reading MBF single precision values and try to call it from VB 6.0.  But as I said, I don't think VB can interface with QB?

RE: the old MBF (Microsoft Binary Format) ?

I'd start here:


This page gives the MS DLL's logic, both in Borland C and  in Delphi.  I think you'll find comments in the C code that document the layout of MBF floating-point values pretty well along with IEEE floats.

If I had your problem, I'd just compile up the Delphi into a 32-bit DLL.  If I lacked a Delphi compiler I'd probably take a stab at converting the Delphi to VB rather than messing with the C version.  Before this I'd take a close look at both versions though to be sure they do the same thing and that it is consistent with the described layouts of both formats.

All you need is MBF2IEEE right?  Should be a piece of cake.  Ugliest part in VB is treating a Single as a byte array.  Several techniques can be used, there is one here:


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close