The RpcNsBindingLookupBegin function creates a lookup context for an interface and an object.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcNsBindingLookupBegin(
unsigned long EntryNameSyntax,
unsigned char * EntryName,
RPC_IF_HANDLE IfSpec,
UUID * ObjUuid,
unsigned long BindingMaxCount,
RPC_NS_HANDLE * LookupContext
);
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.
To use the entry name specified in the registry value HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\
DefaultEntry, provide a null pointer or an empty string. In this case, the EntryNameSyntax parameter is ignored and the run-time library uses the default syntax EntryName.
For a non-nil UUID, compatible binding handles are returned from an entry only if the server has exported the specified object UUID.
For a null pointer value or a nil UUID for this argument, the returned binding handles contain one of the object UUIDs exported by the compatible server. If the server did not export any object UUIDs, the returned compatible binding handles contain a nil object UUID.
Specify a value of zero to use the default count of RPC_C_BINDING_MAX_COUNT_DEFAULT.
Value | Meaning |
---|---|
RPC_S_OK | Success |
RPC_S_INVALID_NAME_SYNTAX | Invalid name syntax |
RPC_S_UNSUPPORTED_NAME_SYNTAX | Unsupported name syntax |
RPC_S_INCOMPLETE_NAME | Incomplete name |
RPC_S_ENTRY_NOT_FOUND | Name-service entry not found |
RPC_S_NAME_SERVICE_UNAVAILABLE | Name service unavailable |
RPC_S_INVALID_OBJECT | Invalid object |
The RpcNsBindingLookupBegin routine creates a lookup context for locating client-compatible binding handles to servers that offer the specified interface and object.
Before calling the RpcNsBindingLookupNext routine, the client application must first call RpcNsBindingLookupBegin to create a lookup context. The arguments to this routine control the operation of the RpcNsBindingLookupNext routine.
Effective with version 5.0 of Windows NT, the RPC environment uses the Active Directory as its name service database and the order in which the runtime environment performs the lookup is as follows:
When finished locating binding handles, the client application calls the RpcNsBindingLookupDone routine to delete the lookup context.
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpcnsi.h.
Import Library: Link with rpcns4.lib.
RpcNsBindingLookupDone, RpcNsBindingLookupNext