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
);
Value | Meaning |
---|---|
RPC_S_OK | Success |
RPC_S_NO_MORE_BINDINGS | No more bindings |
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.
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpcnsi.h.
Import Library: Link with rpcns4.lib.
RpcBindingFree, RpcNsBindingLookupNext, RpcStringBindingParse