OpenTP1 Version 7 Programming Reference C Language

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

dc_rpc_close - Terminate an application program

Format

ANSI C, C++

#include <dcrpc.h>
void dc_rpc_close (DCLONG flags)

K&R C

#include <dcrpc.h>
void dc_rpc_close (flags)
DCLONG  flags;

Description

The function dc_rpc_close() closes the environment for using various types of OpenTP1 functions. OpenTP1 functions cannot be used after the function dc_rpc_close().

The function dc_rpc_close() must be called in the main function. Call the function dc_rpc_close() only once in the process.

The function dc_rpc_close() also informs OpenTP1 of normal termination. If a UAP terminates without the function dc_rpc_close() called, OpenTP1 assumes that the UAP terminated abnormally. Consequently, the service group might be shut down or the process might be restarted. To make matters worse, various OpenTP1 resources might not be released, which affects the subsequent processing.

If the function dc_rpc_open() is called from any UAP used with OpenTP1, the function dc_rpc_close() must be called before the UAP terminates with exit().

Call the function dc_rpc_close() even if the function dc_rpc_open() returns with an error.

After the function dc_rpc_close() is called, the function dc_rpc_open() cannot be called from the same UAP.

Argument whose value is set in the UAP

flags

Specify DCNOFLAGS.

Return value

There is no return value of the function dc_rpc_close().