Binding Option Constants

Applications set the binding option constants to control how the RPC run-time library processes remote procedure calls. The following table lists each binding property, and the relevant constant values for the binding properties.


All message queue options (MQ) in the following table are valid for Windows 2000 only. Windows XP and later versions do not support message queuing. Developers are discouraged from using message queuing.

Constant/value Description
Default. If FALSE, causal call ordering. RPC calls are executed in strict order of submission. See Remarks.
If TRUE, noncausal call ordering. RPC calls are executed independently. See Remarks.
Not needed for application programs. Used internally by Microsoft.
Not needed for application programs. Used internally by Microsoft.
If TRUE, a session ID is generated for each connection.
If TRUE, client-side cookie-based authentication is used for connections. A pointer to the RPC_C_OPT_COOKIE_AUTH_DESCRIPTOR structure is passed as the OptionValue parameter in RpcBindingSetOption.
Not needed for application programs. Used internally by Microsoft.
If TRUE, force shutdown of the association after the last binding handle/context handle on it is freed.
When set to true, RPC does not reuse existing connections. A unique binding handle is opened for each connection and state is maintained for each unique binding handle.


By default, the RPC run-time library executes the calls on a given binding handle from each thread of an application in strict order of submission. This does not guarantee that calls from different threads on the same binding handle are serialized. Multithreaded applications must serialize their RPC calls. If this behavior is too restrictive, you can enable noncausal ordering. When you do, the RPC run-time library executes calls independently. It imposes no ordering on their submission.

One example of an application that might find noncausal ordering useful is a multithreaded program whose threads make calls on the same binding handle. Similarly, a program that uses multiple asynchronous calls on a binding handle will find noncausal ordering a convenient option. Another example might be an Internet proxy program that uses a single thread to handle requests for several clients. In each of these cases, it would be extremely restrictive to try to serialize the remote procedure calls.

The RPC_C_OPT_DONT_LINGER option can be set only on binding handles that use the ncalrpc or ncacn_* protocol sequences. It cannot be used on ncadg_* protocol sequences. The RpcBindingSetOption function with this option must be called on a binding handle on which at least one RPC call has been made. If no RPC call have been made on the binding handle, RPC_S_WRONG_KIND_OF_BINDING is returned from the RpcBindingSetOption function call. The option takes effect for the entire association, regardless of how many binding handles are attached to the association. Since it is checked before the association is destroyed, it can be set at any time before the binding handle is closed.


Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]

See also



Managing Network Connection Sets (Associations)