RpcStringBindingCompose

The RpcStringBindingCompose function combines the components of a string binding into a string binding.

#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcStringBindingCompose( 
  unsigned char *  ObjUuid,       
  unsigned char *  ProtSeq,       
  unsigned char *  NetworkAddr,   
  unsigned char *  EndPoint,      
  unsigned char *  Options,       
  unsigned char * *  StringBinding  
);
 

Parameters

ObjUuid
Points to a NULL-terminated string representation of an object UUID. For example, the string "6B29FC40-CA47-1067-B31D-00DD010662DA" represents a valid UUID.
ProtSeq
Points to a NULL-terminated string representation of a protocol sequence.

For a list of Microsoft RPC's supported protocol sequences, see the reference topic String Binding in RPC Data Types and Structures.

NetworkAddr
Points to a NULL-terminated string representation of a network address. The network-address format is associated with the protocol sequence. For more information, see the RPC data types and structures reference entry for string binding.
EndPoint
Points to a NULL-terminated string representation of an endpoint. The endpoint format and content are associated with the protocol sequence. For example, the endpoint associated with the protocol sequence ncacn_np is a pipe name in the format "\pipe\pipename". For more information, see the RPC data types and structures reference entry for string binding.
Options
Points to a NULL-terminated string representation of network options. The option string is associated with the protocol sequence. For more information, see the RPC data types and structures reference entry for string binding.
StringBinding
Returns a pointer to a pointer to a NULL-terminated string representation of a binding handle.

Specify a null value to prevent RpcStringBindingCompose from returning the StringBinding argument. In this case, the application does not call the RpcStringFree routine. For more information, see the RPC data types and structures reference entry for string binding.

Remarks

An application calls the RpcStringBindingCompose routine to combine the components of a string-binding handle into a string-binding handle.

The RPC run-time library allocates memory for the string returned in the StringBinding argument. The application is responsible for calling the RpcStringFree routine to deallocate that memory.

Specify a null argument value or provide an empty string ("\0") for each input string that has no data.

Literal backslash characters within C-language strings must be quoted. The actual C string for the server name appears as "\\\\servername", and the actual C string for a pipe name appears as "\\pipe\\pipename".

Return Values

Value Meaning
RPC_S_OK Success
RPC_S_INVALID_STRING_UUID String representation of the UUID not valid.

QuickInfo

  Windows NT: Yes
  Windows CE: Unsupported.
  Header: Declared in rpcdce.h.
  Import Library: Link with rpcrt4.lib.

See Also

RpcBindingFromStringBinding, RpcBindingToStringBinding, RpcStringBindingParse, RpcStringFree