RpcStringBindingComposeA function (rpcdce.h)
The RpcStringBindingCompose function creates a string binding handle.
Syntax
RPC_STATUS RpcStringBindingComposeA(
RPC_CSTR ObjUuid,
RPC_CSTR ProtSeq,
RPC_CSTR NetworkAddr,
RPC_CSTR Endpoint,
RPC_CSTR Options,
RPC_CSTR *StringBinding
);
Parameters
ObjUuid
Pointer to a null-terminated string representation of an object UUID. For example, the string 6B29FC40-CA47-1067-B31D-00DD010662DA represents a valid UUID.
ProtSeq
Pointer to a null-terminated string representation of a protocol sequence. See Note.
NetworkAddr
Pointer to a null-terminated string representation of a network address. The network-address format is associated with the protocol sequence. See Note.
Endpoint
Pointer 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. See Note.
Options
Pointer to a null-terminated string representation of network options. The option string is associated with the protocol sequence. See Note.
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 parameter. In this case, the application does not call RpcStringFree. See Note.
Return value
Value | Meaning |
---|---|
|
The call succeeded. |
|
The string representation of the UUID is not valid. |
Remarks
An application calls RpcStringBindingCompose routine to combine an object UUID, a protocol sequence, a network address, an endpoint and other network options into a string representation of a binding handle.
The RPC run-time library allocates memory for the string returned in the StringBinding parameter. The application is responsible for calling RpcStringFree to deallocate that memory.
Specify a null parameter 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 for the ncacn_np protocol sequence appears as \\servername, and the actual C string for a pipe name appears as \pipe\pipename.
Note
The rpcdce.h header defines RpcStringBindingCompose as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
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 |