RpcBindingFromStringBinding function (rpcdce.h)

The RpcBindingFromStringBinding function returns a binding handle from a string representation of a binding handle.

Syntax

RPC_STATUS RpcBindingFromStringBinding(
  RPC_CSTR           StringBinding,
  RPC_BINDING_HANDLE *Binding
);

Parameters

StringBinding

Pointer to a string representation of a binding handle.

Binding

Returns a pointer to the server binding handle.

Return value

Value Meaning
RPC_S_OK
The call succeeded.
RPC_S_INVALID_STRING_BINDING
The string binding is not valid.
RPC_S_PROTSEQ_NOT_SUPPORTED
Protocol sequence not supported on this host.
RPC_S_INVALID_RPC_PROTSEQ
The protocol sequence is not valid.
RPC_S_INVALID_ENDPOINT_FORMAT
The endpoint format is not valid.
RPC_S_STRING_TOO_LONG
String too long.
RPC_S_INVALID_NET_ADDR
The network address is not valid.
RPC_S_INVALID_ARG
The argument was not valid.
RPC_S_INVALID_NAF_ID
The network address family identifier is not valid.
 
Note  For a list of valid error codes, see RPC Return Values.
 

Remarks

The RpcBindingFromStringBinding function creates a server binding handle from a string representation of a binding handle. The StringBinding parameter does not have to contain an object UUID. In this case, the returned binding contains a nil UUID. If the provided StringBinding parameter does not contain an endpoint field, the returned Binding parameter is a partially-bound binding handle. If the provided StringBinding parameter contains an endpoint field, the endpoint is considered to be a well-known endpoint. If the provided StringBinding parameter does not contain a host address field, the returned Binding parameter references the local host.

An application creates a string binding by calling the RpcStringBindingCompose function or by providing a character-string constant. The creation of a string binding by this method does not involve contact with the server. Success or failure of the API will not indicate server availability.

When an application is finished using the Binding parameter, the application should call the RpcBindingFree function to release the memory used by the binding handle.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header rpcdce.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

See also

RpcBindingCopy

RpcBindingFree

RpcBindingToStringBinding

RpcStringBindingCompose