RpcBindingUnbind function (rpcasync.h)

The RpcBindingUnbind function unbinds a binding handle previously bound by RpcBindingBind.

Syntax

RPC_STATUS RpcBindingUnbind(
  [in] RPC_BINDING_HANDLE Binding
);

Parameters

[in] Binding

RPC_BINDING_HANDLE structure that contains the binding handle to unbind from the RPC server.

Return value

This function returns RPC_S_OK on success; otherwise, an RPC_S_* error code is returned.

Note  For a list of valid error codes, see RPC Return Values.
 

Remarks

RpcBindingUnbind unbinds a previously bound binding handle from an RPC server. An unbound handle can be modified with calls like RpcBindingSetOption and RpcBindingSetAuthInfoEx. A binding handle in the unbound state can be bound again and re-used to make calls.

The results of an unbind operation are undefined if it is called on a binding handle that currently has RPC calls in progress at the time of unbinding. It is the responsibility of the caller to ensure that no calls are in progress at the time an unbind operation is attempted.

Note that calling RpcBindingUnbind does not necessarily disconnect the client from the server. It will invalidate any cached information used by the binding handle, but actually disconnection is not ensured. To ensure disconnection, free the binding handle with RpcBindingFree.

Windows Vista:  Currently, this function supports only the ncalrpc protocol sequence.

Requirements

Requirement Value
Minimum supported client Windows Vista, Windows XP with SP2 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008, Windows Server 2003 with SP1 [desktop apps | UWP apps]
Target Platform Windows
Header rpcasync.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

See also

RpcBindingBind

RpcBindingFree