rpc_ns_binding_select(3) — Subroutines
NAME
rpc_ns_binding_select - Returns a binding handle from a list of compatible server binding handles
Used by client applications.
SYNOPSIS
#include <dce/rpc.h>
void rpc_ns_binding_select(
rpc_binding_vector_t ∗binding_vec ,
rpc_binding_handle_t ∗binding ,
unsigned32 ∗status );
PARAMETERS
Input/Output
binding_vecSpecifies the vector of compatible server binding handles from which a binding handle is selected. The returned binding vector no longer references the selected binding handle (returned separately in the binding argument).
Output
bindingReturns a selected server binding handle.
statusReturns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not. The possible status codes and their meanings are as follows:
rpc_s_okSuccess.
rpc_s_no_more_bindings
No more bindings.
DESCRIPTION
The rpc_ns_binding_select routine randomly chooses and returns a server binding handle from a vector of server binding handles.
Each time the client calls the rpc_ns_binding_select routine, the routine returns another binding handle from the vector.
When all of the binding handles are returned from the vector, the routine returns a status code of rpc_s_no_more_bindings and returns the value NULL in argument binding.
The select operation allocates storage for the data referenced by the returned binding argument. When a client finishes with the binding handle, it calls the rpc_binding_free routine to deallocate the storage. Each call to the rpc_ns_binding_select routine requires a corresponding call to the rpc_binding_free routine.
Instead of using this routine, client applications can select a binding handle according to their specific needs. In this case the rpc_binding_to_string_binding and rpc_string_binding_parse routines are useful to the applications since the routines work together to extract the individual fields of a binding handle for examination.
Permissions Required
None.
NOTE:
For this release, the RPC naming service (rpc_ns) routines are not implemented, nor is an independent naming service provided.
RETURN VALUES
None.
RELATED INFORMATION
Functions: rpc_binding_free(3), rpc_binding_to_string_binding(3), rpc_ns_binding_lookup_next(3), rpc_string_binding_parse(3)