RpcNsBindingImportBegin

The RpcNsBindingImportBegin function creates an import context for an interface and an object.

#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcNsBindingImportBegin( 
  unsigned long  EntryNameSyntax,   
  unsigned char *  EntryName,   
  RPC_IF_HANDLE  IfSpec,        
  UUID *  ObjUuid,              
  RPC_NS_HANDLE *  ImportContext  
);
 

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 binding handles 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 import. 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.

When the ObjUuid argument has a null pointer value or a nil UUID, 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.

ImportContext
Specifies a returned name-service handle for use with the RpcNsBindingImportNext and RpcNsBindingImportDone routines.

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

Remarks

The RpcNsBindingImportBegin routine creates an import context for importing client-compatible binding handles for servers that offer the specified interface and object.

Before calling the RpcNsBindingImportNext routine, the client application must first call RpcNsBindingImportBegin to create an import context. The arguments to this routine control the operation of the RpcNsBindingImportNext routine.

When finished importing binding handles, the client application calls the RpcNsBindingImportDone routine to delete the import context.

QuickInfo

  Windows NT: Yes
  Windows CE: Unsupported.
  Header: Declared in rpcnsi.h.
  Import Library: Link with rpcns4.lib.

See Also

RpcNsBindingImportDone, RpcNsBindingImportNext