rpc_$dup_handle Library Routine

Purpose

Makes a copy of a Remote Procedure Call (RPC) handle.

Syntax

handle_t rpc_$dup_handle ( handle,  status)
handle_t handle;
status_$t *status;

Description

The rpc_$dup_handle routine returns a copy of an existing RPC handle. Both handles can then be used in the client program for concurrent multiple accesses to a binding. Because all duplicates of a handle reference the same data, a call to the rpc_$set_binding, rpc_$clear_binding, or rpc_$clear_server_binding routine made on any one duplicate affects all duplicates. However, an RPC handle is not freed until the rpc_$free_handle routine is called on all copies of the handle.

Note: This routine is used by clients only.

Parameters

Input

Item Description
handle Specifies the RPC handle to be copied.

Output

Item Description
status Points to the completion status.

Return Values

Upon successful completion, this routine returns the duplicate handle (handle_t).

Examples

To create a copy of a handle, enter:

thread_2_handle = rpc_$dup_handle(handle, &st);

The copy is called thread_2_handle.