RAD Studio |  |

_open_osfhandle

Header File

io.h

Category

Input/output Routines

Prototype

int _open_osfhandle(long osfhandle, int flags);

Description

Associates file handles.

The _open_osfhandle function allocates a runtime file handle and sets it to point to the operating system file handle specified by osfhandle.

The value flags is a bitwise OR combination of one or more of the following manifest constants (defined in fcntl.h):

O_APPEND | Repositions the file pointer to the end of the file before every write operation.
O_RDONLY | Opens the file for reading only.
O_TEXT | Opens the file in text (translated) mode.

Return Value

On success, _open_osfhandle returns a C runtime file handle. Otherwise, it returns -1.

Portability

POSIX | Win32 | ANSI C | ANSI C++
| + |  |

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!