CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2000
    Location
    Arizona, USA
    Posts
    493

    Reading Binary Files

    What is the most efficient or best way to read a binary file? I need to read the file in blocks
    of 1000 bytes at a time. Can you read each byte seperatly or is there a better way to read a
    certain number of bytes? I need to do something like this:

    Variable1 = First 1000 Bytes Of File
    Variable2 = Second 1000 Bytes Of File
    Variable3 = Third 1000 Bytes Of File

    If anyone has any ideas it is greatly appreciated!!!

    Kris
    Software Engineer
    Phoenix,AZ
    Kris
    Software Engineer
    Phoenix, AZ USA

  2. #2
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: Reading Binary Files

    If I'm not mistaken, Input() or InputB() function can do the trick.

    -Cool Bizs

    Good Luck,
    -Cool Bizs

  3. #3
    Join Date
    Mar 2000
    Location
    Arizona, USA
    Posts
    493

    Re: Reading Binary Files

    That's exactly it! i was reading it in MSDN the same time you responed. Thanks a lot for
    the help. I appreciate it!

    Kris
    Software Engineer
    Phoenix,AZ
    Kris
    Software Engineer
    Phoenix, AZ USA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured