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

RPC_BINDING_HANDLE (Rpcdce.h)

· 52CE 我爱测

The RPC_BINDING_HANDLE data type declares a binding handle containing information that the RPC run-time library uses to access binding information.

The RPC_BINDING_HANDLE data type declares a binding handle containing information that the RPC run-time library uses to access binding information.

typedef I_RPC_HANDLE RPC_BINDING_HANDLE;

Remarks

The run-time library uses binding information to establish a client-server relationship that allows the execution of remote procedure calls. Based on the context in which a binding handle is created, it is considered a server-binding handle or a client-binding handle.

A server-binding handle contains the information necessary for a client to establish a relationship with a specific server. Any number of RPC API run-time routines return a server-binding handle that can be used for making a remote procedure call.

A client-binding handle cannot be used to make a remote procedure call. The RPC run-time library creates and provides a client-binding handle to a called-server procedure (also called a server-manager routine) as the RPC_BINDING_HANDLE parameter. The client-binding handle contains information about the calling client.

The RpcBinding* and RpcNsBinding* functions return the status code RPC_S_WRONG_KIND_OF_BINDING when an application provides the incorrect binding-handle type.

An application can share a single binding handle across multiple threads of execution. The RPC run-time library manages concurrent remote procedure calls that use a single binding handle. However, the application is responsible for binding handle concurrency control for operations that modify a binding handle. These operations include the following routines:

For example, if an application shares a binding handle across two threads of execution and resets the binding-handle endpoint in one of the threads by calling RpcBindingReset, the results are undefined. The binding handle on the other thread may also be reset, or the operation may fail, or the process may crash. A common error is freeing a binding handle while a call on it is in progress; this usually crashes the calling process.

If you do not want concurrency, you can design an application to create a copy of a binding handle by calling RpcBindingCopy. In this case, an operation to the first binding handle has no effect on the second binding handle.

Routines requiring a binding handle as a parameter show a data type of RPC_BINDING_HANDLE. Binding-handle parameters are passed by value.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header Rpcdce.h (include Rpc.h)

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)

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

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