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

    How to open a file in binary mode?

    How to open a file in binary mode and write it back in text mode
    Thaks

  2. #2
    Join Date
    Sep 2003
    Location
    nagpur for all
    Posts
    121
    hi
    i am not getting your problem..
    but if you want to open file in binary mode then us CFile::typeBinary mode to open the file.

    if this doesnot solves the problem then please specify the problem in detail

    dhani99
    have a nice day!

  3. #3
    Join Date
    Apr 2002
    Posts
    35

    trying to read a gif file

    Hi, I am trying to read a gif file in binary mode and want to write that file in text mode.

  4. #4
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    Is this the same question as How to open a file in binary mode?? That question is very strange and probably it is not possible to do what you are asking.

    If you are not using MFC then in this forum you need to say so.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  5. #5
    Join Date
    Apr 2002
    Posts
    35
    no i am not using MFC

  6. #6
    Join Date
    Sep 2002
    Location
    DC Metro Area, USA
    Posts
    1,509
    You don't want to write a gif file in text mode. Text mode does two things as I understand it (and neither apply to GIF files):
    1. it handles the EOF character gracefully
    2. it converts carriage return–linefeed to linefeeds on input and back to carriage return–linefeed on output.

    You do NOT want either of this things to happen in a GIF file.
    bytz
    --This signature left intentionally blank--

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