PreviousNext

Binding Information in Strings

Occasionally, a client can receive binding information in the form of a string (also known as a string binding). The client can receive a string binding (or the information to compose a string binding) from many sources; for example, an application-specific environment variable, a file, or the application user. The client must call the RPC runtime to convert a string binding to a binding handle. The runtime returns this binding handle to the client to use for remote procedure calls.

String representations of binding information have several possible components. The binding information includes an RPC protocol sequence, a network address, and an endpoint. The protocol sequence is mandatory; the endpoint is optional; and for a server on the client's system, the network address is optional. Also, a string binding optionally associates an object UUID with the binding information.

The string bindings have the following format:

obj-uuid@rpc-protocol-seq:network-addr[endpoint,option-name=opt-value...]

or

obj-uuid@rpc-protocol-seq:network-addr[endpoint=endpoint,option-name=opt-value...]

The following example string binding contains all possible components:

b07122e2-83df-11c9-be29-08002b1110fa@ncacn_ip_tcp:130.105.1.1.123[2001]

The following example string binding contains only the protocol sequence and network address:

ncacn_ip_tcp:130.105.1.1.123

For more information about the string binding format, see the RPC introduction reference page, rpc_intro(3rpc).

String bindings are useful in small environments; for example, when developing and testing an application. However, string bindings are inappropriate as the principal way of providing binding information to clients. Applications should use the directory service to advertise binding information.