RpcBindingFromStringBindingW function (rpcdce.h)
The RpcBindingFromStringBinding function returns a binding handle from a string representation of a binding handle.
Syntax
RPC_STATUS RpcBindingFromStringBindingW(
RPC_WSTR 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 |
---|---|
|
The call succeeded. |
|
The string binding is not valid. |
|
Protocol sequence not supported on this host. |
|
The protocol sequence is not valid. |
|
The endpoint format is not valid. |
|
String too long. |
|
The network address is not valid. |
|
The argument was not valid. |
|
The network address family identifier is not valid. |
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.
Note
The rpcdce.h header defines RpcBindingFromStringBinding as an alias which 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 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 |