Binding is the process of creating a logical connection between a client and a server that the client uses to make remote procedure calls to that server. The binding between client and server is represented by a data structure called a binding handle.
A binding handle is analogous to a file handle returned by the fopen C run-time library function or a window handle returned by the function CreateWindow. As with these handles, the binding handle is opaque; your application cannot use it to directly access and manipulate data about that binding. This handle is a pointer or index into a data structure that is available only to the RPC run-time libraries. You provide the handle and the run-time libraries access the appropriate data.
The client obtains a handle by calling RPC run-time functions that bind to the server, or by supplying a name or UUID to a service that provides the corresponding handle.
The handles managed by an application can be classified into two broad categories: context handles and binding handles. Context handles are used to maintain state information while binding handles contain only information about the binding. Note that a serialization application also manages serialization handles, but these are not binding handles. See Encoding Services for additional information on serialization handles.
Every binding handle is either primitive or user defined, according to its data type. In addition to being primitive or user defined, every handle is either implicit or explicit, according to the way your application specifies the handle for each remote procedure call. These types combine to specify four kinds of binding handles:
This section defines the characteristics of RPC binding handles and demonstrates their use in sample applications.
Note In addition to binding handles, Microsoft RPC also supports serialization handles used to encode or decode data. These are used for serialization on a local computer and do not involve remote binding. For additional information on serialization handles, see Encoding Services.