RpcNsBindingSelect
The RpcNsBindingSelect
function returns a binding handle from a list of compatible binding handles.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcNsBindingSelect(
RPC_BINDING_VECTOR * BindingVec, |
|
RPC_BINDING_HANDLE * Binding |
|
); |
|
Parameters
BindingVec
Points to the
vector of client-compatible server binding handles from which a binding handle
is selected. The returned binding vector no longer references the selected
binding handle, which is returned separately in the Binding argument.
Binding
Returns a
pointer to a selected binding handle.
Remarks
The RpcNsBindingSelect
routine chooses and returns a client-compatible server binding handle from a
vector of server binding handles.
Each time the
client calls the RpcNsBindingSelect routine, the routine operation
returns another binding handle from the vector.
When all of
the binding handles have been returned from the vector, the routine returns a
status of RPC_S_NO_MORE_BINDINGS and returns a Binding argument value of
NULL.
The select
operation allocates storage for the data referenced by the returned Binding
argument. When a client finishes with the binding handle, it should call the RpcBindingFree
routine to deallocate the storage. Each call to the RpcNsBindingSelect
routine requires a corresponding call to the RpcBindingFree routine.
Clients can
create their own select routines implementing application-specific selection
criteria. In this case, the RpcStringBindingParse routine provides
access to the fields of a binding.
Return Values
Value |
Meaning |
RPC_S_OK |
Success |
RPC_S_NO_MORE_BINDINGS |
No more
bindings |
See Also