RpcStringBindingParse function (rpcdce.h)

The RpcStringBindingParse function returns the object UUID part and the address parts of a string binding as separate strings. An application calls RpcStringBindingParse to parse a string representation of a binding handle into its component fields. The RpcStringBindingParse function returns the object UUID part and the address parts of a string binding as separate strings.

Syntax

RPC_STATUS RpcStringBindingParse(
  RPC_CSTR StringBinding,
  RPC_CSTR *ObjUuid,
  RPC_CSTR *Protseq,
  RPC_CSTR *NetworkAddr,
  RPC_CSTR *Endpoint,
  RPC_CSTR *NetworkOptions
);

Parameters

StringBinding

Pointer to a null-terminated string representation of a binding.

ObjUuid

Returns a pointer to a pointer to a null-terminated string representation of an object UUID.

Specify a NULL value to prevent RpcStringBindingParse from returning the ObjectUuid parameter. In this case, the application does not call RpcStringFree.

Protseq

Returns a pointer to a pointer to a null-terminated string representation of a protocol sequence. For a list of Microsoft RPC supported protocol sequences, see String Binding.

Specify a NULL value to prevent RpcStringBindingParse from returning the ProtSeq parameter. In this case, the application does not call RpcStringFree.

NetworkAddr

Returns a pointer to a pointer to a null-terminated string representation of a network address. Specify a NULL value to prevent RpcStringBindingParse from returning the NetworkAddr parameter. In this case, the application does not call RpcStringFree.

Endpoint

Returns a pointer to a pointer to a null-terminated string representation of an endpoint. Specify a NULL value to prevent RpcStringBindingParse from returning the EndPoint parameter. In this case, the application does not call RpcStringFree.

NetworkOptions

Returns a pointer to a pointer to a null-terminated string representation of network options.

Specify a NULL value to prevent RpcStringBindingParse from returning the NetworkOptions parameter. In this case, the application does not call RpcStringFree.

Return value

Value Meaning
RPC_S_OK
The call succeeded.
RPC_S_INVALID_STRING_BINDING
The string binding is invalid.
 
Note  For a list of valid error codes, see RPC Return Values.
 

Remarks

An application calls RpcStringBindingParse routine to parse a string representation of a binding handle into its component fields.

The RPC run-time library allocates memory for each component string returned. The application is responsible for calling RpcStringFree once for each returned string to deallocate the memory for that string.

If any field of the StringBinding parameter is empty, RpcStringBindingParse returns an empty string (\0) in the corresponding output parameter.

Note  To query a client's address, an application starts by calling the RpcBindingServerFromClient function to obtain a partially bound server binding handle. The server binding handle can be used to obtain a string binding by invoking RpcBindingToStringBinding. The server can then call RpcStringBindingParse to extract the client's network address from the string binding.
 

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

RpcBindingFromStringBinding

RpcBindingToStringBinding

RpcStringBindingCompose

RpcStringFree