RpcNsBindingImportBegin function
The RpcNsBindingImportBegin function creates an import context for importing client-compatible binding handles for servers that offer the specified interface and object.
Syntax
RPC_STATUS RPC_ENTRY RpcNsBindingImportBegin( unsigned long EntryNameSyntax, unsigned char *EntryName, RPC_IF_HANDLE IfSpec, UUID *ObjUuid, RPC_NS_HANDLE *ImportContext );
Parameters
- EntryNameSyntax
-
Syntax of EntryName.
To use the syntax specified in the registry value entry HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\DefaultSyntax, specify RPC_C_NS_SYNTAX_DEFAULT.
- EntryName
-
Pointer to an entry name at which the search for compatible binding handles begins.
To use the entry name specified in the registry value entry 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.
- IfSpec
-
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 parameter. 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 contacted server might not support the desired interface.
- ObjUuid
-
Pointer to an optional object UUID.
For a nonzero UUID, compatible binding handles are returned from an entry only if the server has exported the specified object UUID.
When ObjUuid 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
-
Name-service handle returned for use with the RpcNsBindingImportNext and RpcNsBindingImportDone functions.
Return value
| Value | Meaning |
|---|---|
|
The call succeeded. |
|
The name syntax is invalid. |
|
The name exceeds the maximum length. |
|
The name syntax is unsupported. |
|
The name is incomplete. |
|
The name-service entry was not found. |
|
The name service is unavailable. |
|
Invalid object. |
Remarks
Before calling the RpcNsBindingImportNext function, the client application must first call RpcNsBindingImportBegin to create an import context. The parameters to this function control the operation of the RpcNsBindingImportNext function.
When finished importing binding handles, the client application calls the RpcNsBindingImportDone function to delete the import context.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
RpcNsBindingImportBeginW (Unicode) and RpcNsBindingImportBeginA (ANSI) |
See also