CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2008
    Posts
    6

    Cool Reading Binary Files

    How can yoy tell when you have reached the end of a binary file? There does not seem to be an End Of File function for this.

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: Reading Binary Files

    Can you post the code you're using.

    Are you aware that you can do this :

    Code:
    string filename = "c:\\binaryfile.dat";
    byte [] fileData = System.IO.File.ReadAllBytes(filename);
    which reads the whole file into the byte array for you.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  3. #3
    Join Date
    May 2008
    Posts
    6

    Smile Re: Reading Binary Files

    Thanks for your response. This is exactly what I was looking for.

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