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

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

4.4.4 dc_clt_get_raphost_s - Acquire the destination of a request to establish a permanent connection

Organization of this subsection
(1) Form
(2) Purpose
(3) Arguments set by UAPs
(4) Arguments that contain return values
(5) Return values
(6) Note

(1) Form

(a) TP1/Client/W
_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_get_raphost_s(DCCLT_ID cltid,
                            char *raphost,
                            DCLONG flags)
 
Non-_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_get_raphost(char *raphost, DCLONG flags)
 
(b) TP1/Client/P
_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_get_raphost_s(DCCLT_ID cltid,
                            char CLTFAR *raphost,
                            DCLONG flags)
 
Non-_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_get_raphost(char CLTFAR *raphost, DCLONG flags)
 

(2) Purpose

The dc_clt_get_raphost_s function acquires the host name and port number of the node to which to send a request to establish a permanent connection.

Before executing the dc_clt_set_raphost_s function to specify the new destination of a request to establish a permanent connection, execute the dc_clt_get_raphost_s function to save the current destination.

When the dc_clt_get_raphost_s function is executed, the latest destination set by the dc_clt_set_raphost_s function is returned to raphost. If the dc_clt_set_raphost_s function has not been executed, the value of DCCLTRAPHOST in the client environment definition is returned to raphost.

(3) Arguments set by UAPs

(4) Arguments that contain return values

(5) Return values

Return value Value (decimal) Meaning
DC_OK 0 The function normally terminated.
DCCLTER_INVALID_ARGS -2501 The value specified in an argument is incorrect.
DCCLTER_PROTO -2502 The dc_rpc_open_s function has not been issued.
DCCLTER_NO_BUFS -2504 A necessary amount of buffer could not be allocated.
DCCLTER_INVALID_CLTID -2544 The client ID specified in cltid differs from the client ID acquired by the dc_clt_cltin_s function.
DCCLTER_DLL_NOT_LOADED -2555 The specified DLL could not be loaded.
DCCLTER_FUNC_NOT_DEFINED -2556 An attempt was made to issue a function not defined in the specified DLL.

(6) Note

Specify an area of 256 bytes# or more for the raphost argument. If the area is smaller than 256 bytes#, the area may be corrupted during TP1/Client internal processing.

#:
If you specify 00000008 for DCCLTOPTION in the client environment definition, this value is 1,024 bytes, not 256 bytes.