RpcNsBindingInqEntryName  2A5KBDJ

The RpcNsBindingInqEntryName function returns the entry name from which the binding handle came.

#include <rpc.h>

RPC_STATUS RPC_ENTRY RpcNsBindingInqEntryName(

    RPC_BINDING_HANDLE  Binding,

 

    unsigned long  EntryNameSyntax,

 

    unsigned char * *  EntryName

 

   );

 

 

Parameters

Binding

Specifies the binding handle whose name-service database entry name is returned.

EntryNameSyntax

Specifies an unsigned long value that indicates the syntax used in the returned argument, EntryName.

To use the syntax specified in the registry value HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\
DefaultSyntax, provide a value of RPC_C_NS_SYNTAX_DEFAULT.

EntryName

Returns a pointer to a pointer to the name of the name-service database entry in which Binding was found.

Specify a null value to prevent RpcNsBindingInqEntryName from returning the EntryName argument. In this case, the application does not call the RpcStringFree routine.

 

Remarks

The RpcNsBindingInqEntryName routine returns the name of the name-service database entry from which a client-compatible binding handle came.

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

An entry name is associated only with binding handles returned from the RpcNsBindingImportNext, RpcNsBindingLookupNext, and RpcNsBindingSelect routines.

If the binding handle specified in the Binding argument was not returned from a name-service database entry (for example, if the binding handle was created by calling RpcBindingFromStringBinding), RpcNsBindingInqEntryName returns an empty string ( \0 ) and an RPC_S_NO_ENTRY_NAME status code.

Return Values

Value

Meaning

RPC_S_OK

Success

RPC_S_INVALID_BINDING

Invalid binding handle

RPC_S_NO_ENTRY_NAME

No entry name for binding

RPC_S_INVALID_NAME_SYNTAX

Invalid name syntax

RPC_S_UNSUPPORTED_NAME_SYNTAX

Unsupported name syntax

RPC_S_INCOMPLETE_NAME

Incomplete name

 

See Also

RpcBindingFromStringBinding, RpcNsBindingImportNext, RpcNsBindingLookupNext, RpcNsBindingSelect, RpcStringFree