Export (0) Print
Expand All

RPC_BINDING_HANDLE

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpcdce.h (include Rpc.h)

 

 

Community Additions

ADD
Show:
© 2015 Microsoft