OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

dc_dam_iclose - Close a physical file

Format

ANSI C, C++

#include <dcdami.h>
int  dc_dam_iclose (int fno, DCLONG flags)

K&R C

#include <dcdami.h>
int  dc_dam_iclose (fno, flags)
int      fno;
DCLONG   flags;

Description

The function dc_dam_iclose() closes a physical file created in the OpenTP1 file system.

If a file is not filled with data, the remaining part up to the end of the file is padded with blocks of null characters only in the following cases:

When closing a physical file, specify the file descriptor which is the return value of the function dc_dam_create() or dc_dam_iopen().

Arguments whose values are set in the UAP

fno

Specify the file descriptor of the file to be closed.

flags

Specify DCNOFLAGS.

Return values

Return value Return value (numeric) Explanation
DC_OK 0 The physical file was closed normally.
DCDAMER_BADF -1603 The file descriptor specified for fno is not the one which was acquired by opening the file normally.
The specified file is not open.
DCDAMER_PARAM_FLAGS -1611 The value specified for flags is invalid.
DCDAMER_IOER -1620 An output error occurred.