大网数据广告活动
网络与域名解析

Binding Option Constants (Rpcdce.h)

· 52CE 我爱测

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.

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.

Note:
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
RPC_C_OPT_BINDING_NONCAUSAL 9 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.
RPC_C_OPT_MAX_OPTIONS 17 Not needed for application programs. Used internally by Microsoft.
RPC_C_DONT_FAIL 4 Not needed for application programs. Used internally by Microsoft.
RPC_C_OPT_SESSION_ID 6 If TRUE, a session ID is generated for each connection.
RPC_C_OPT_COOKIE_AUTH 7 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.
RPC_C_OPT_RESOURCE_TYPE_UUID 8 Not needed for application programs. Used internally by Microsoft.
RPC_C_OPT_DONT_LINGER 13 If TRUE, force shutdown of the association after the last binding handle/context handle on it is freed.
RPC_C_OPT_UNIQUE_BINDING 11 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.

Remarks

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.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header Rpcdce.h; Rpcdcep.h

See also

RpcBindingSetOption

RpcBindingInqOption

Managing Network Connection Sets (Associations)

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。