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
);
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.
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.
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 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.
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpcnsi.h.
Import Library: Link with rpcns4.lib.
RpcNsBindingImportDone, RpcNsBindingImportNext