Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

RpcStringBindingParse function

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 RPC_ENTRY RpcStringBindingParse(
  TCHAR *StringBinding,
  TCHAR **ObjectUuid,
  TCHAR **ProtSeq,
  TCHAR **NetworkAddr,
  TCHAR **EndPoint,
  TCHAR **NetworkOptions
);

Parameters

StringBinding

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

ObjectUuid

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

ValueMeaning
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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpcdce.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

Unicode and ANSI names

RpcStringBindingParseW (Unicode) and RpcStringBindingParseA (ANSI)

See also

RpcBindingFromStringBinding
RpcBindingToStringBinding
RpcStringBindingCompose
RpcStringFree

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.