Compartir a través de


Translation Mode Constants (Windows CE 5.0)

Send Feedback

Developing an Application > Microsoft C Run-time Library for Windows CE > Run-time Library Global Constants

The _O_BINARY and _O_TEXT manifest constants determine the translation mode for streams (_setmode).

#include <fcntl.h>

The allowed values are as follows.

  • _O_TEXT
    Opens file in text (translated) mode.

    Carriage return – linefeed (CR-LF) combinations are translated into a single linefeed (LF) on input. Linefeed characters are translated into CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input.

    In files opened for reading and reading/writing, fopen checks for CTRL+Z at the end of the file and removes it, if possible. This is done because using the fseek and ftell functions to move within a file ending with CTRL+Z might cause fseek to behave improperly near the end of the file.

  • _O_BINARY
    Opens file in binary (untranslated) mode.

    The above translations are suppressed.

See Also

fopen | fseek | ftell | _setmode

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.