OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

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

4.3.1 dc_rpc_open_s - UAP startup

Organization of this subsection
(1) Form
(2) Purpose
(3) Argument set by UAPs
(4) Return values
(5) Notes

(1) Form

TP1/Client/W or TP1/Client/P

(a) _s version of the function
 
#include <dcvrpc.h>
DCLONG dc_rpc_open_s(DCCLT_ID cltid, DCLONG flags)
 
(b) Non-_s version of the function
 
#include <dcvrpc.h>
int dc_rpc_open(DCLONG flags)
 

(2) Purpose

Initializes the environment for calling OpenTP1 SPPs or using the TCP/IP communication function.

Execute the dc_rpc_open_s function before executing a remote procedure call, transaction control, or various functions for the transaction control.

(3) Argument set by UAPs

(4) Return values

Return Value Value (decimal) Meaning
DC_OK 0 Normal termination
DCRPCER_INVALID_ARGS -2401 Invalid argument
DCRPCER_PROTO -2402 The dc_rpc_open_s function has already been issued. Alternatively, the dc_clt_cltin_s function has not been executed.
DCRPC_FATAL -2403 The return value has been returned because of failure to initialize, or an invalid client environment definition.
DCRPCER_PORT_IN_USE -2447 A specified port number is in use.
DCCLTER_INVALID_CLTID -2544 The client ID specified in cltid differs from the client ID received by the dc_clt_cltin_s function.

(5) Notes

Issuing the dc_rpc_close_s function must not be immediately followed by issuing the dc_rpc_open_s function with flags set to DCCLT_ONEWAY_RCV, as the following describes. The dc_rpc_open_s function can only be issued 15-20 seconds later.