RpcNsBindingLookupBegin  5AA7GZ

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

 

   );

 

 

Parameters

EntryNameSyntax

Specifies an unsigned long value that indicates the syntax of the next 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

Points to an entry name at which the search for compatible bindings begins.

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.

IfSpec

Specifies a stub-generated data structure indicating the interface to look up. If the interface specification has not been exported or is of no concern to the caller, specify a null value for this argument. In this case, the bindings returned are only guaranteed to be of a compatible and supported protocol sequence and to contain the specified object UUID. The desired interface may not be supported by the contacted server.

ObjUuid

Points to an optional object UUID.

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.

BindingMaxCount

Specifies the maximum number of bindings to return in the BindingVec argument from the RpcNsBindingLookupNext routine.

Specify a value of zero to use the default count of RPC_C_BINDING_MAX_COUNT_DEFAULT.

LookupContext

Returns a pointer to a name-service handle for use with the RpcNsBindingLookupNext and RpcNsBindingLookupDone routines.

 

Remarks

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.

When finished locating binding handles, the client application calls the RpcNsBindingLookupDone routine to delete the lookup context.

Return Values

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

 

See Also

RpcNsBindingLookupDone, RpcNsBindingLookupNext