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
);
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.
Specify a null value to prevent RpcNsBindingInqEntryName from returning the EntryName argument. In this case, the application does not call the RpcStringFree routine.
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 |
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.
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpcdce.h.
Import Library: Link with rpcrt4.lib.
RpcBindingFromStringBinding, RpcNsBindingImportNext, RpcNsBindingLookupNext, RpcNsBindingSelect, RpcStringFree