RpcNsBindingInqEntryNameW function (rpcdce.h)

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

Note  This function is not supported on Windows Vista and later operating systems.
 

Syntax

RPC_STATUS RpcNsBindingInqEntryNameW(
  RPC_BINDING_HANDLE Binding,
  unsigned long      EntryNameSyntax,
  RPC_WSTR           *EntryName
);

Parameters

Binding

Binding handle whose name-service database entry name is returned.

EntryNameSyntax

Syntax used in EntryName.

To use the syntax specified in the registry value entry

HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\DefaultSyntax, provide a value of RPC_C_NS_SYNTAX_DEFAULT.

EntryName

Returns the address of 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 parameter. In this case, the application does not call the RpcStringFree function.

Return value

Value Meaning
RPC_S_OK
The call succeeded.
RPC_S_INVALID_BINDING
The binding handle was invalid.
RPC_S_NO_ENTRY_NAME
No entry name for binding.
RPC_S_INVALID_NAME_SYNTAX
The name syntax is invalid.
RPC_S_UNSUPPORTED_NAME_SYNTAX
The name syntax is unsupported.
RPC_S_INCOMPLETE_NAME
The name is incomplete.
 
Note  For a list of valid error codes, see RPC Return Values.
 

Remarks

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

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

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

If the binding handle specified in the Binding parameter 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.

Note

The rpcdce.h header defines RpcNsBindingInqEntryName 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 only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header rpcdce.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

See also

RpcBindingFromStringBinding

RpcNsBindingImportNext

RpcNsBindingLookupNext

RpcNsBindingSelect

RpcStringFree