RpcServerUseProtseqIfEx
The RpcServerUseProtseqIfEx
function tells the RPC run-time library to use the specified protocol sequence
combined with the endpoints in the interface specification for receiving remote
procedure calls. For a list of Microsoft RPC s supported protocol sequences,
see the reference topic String Binding
This function
is supported only on Windows NT 4.0.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcServerUseProtseqIfEx(
unsigned char * Protseq, |
|
unsigned int MaxCalls, |
|
RPC_IF_HANDLE IfSpec, |
|
void *
SecurityDescriptor, |
|
PRPC_POLICY Policy |
|
); |
|
Parameters
Protseq
Points to a
string identifier of the protocol sequence to register with the RPC run-time
library.
MaxCalls
Specifies the
maximum number of concurrent remote procedure call requests the server wants to
handle.
The RPC
run-time library guarantees that the server can accept at least this number of
concurrent call requests. The actual number can be greater, depending on the
selected protocol sequence.
Use
RPC_C_PROTSEQ_MAX_REQS_DEFAULT to specify the default value.
IfSpec
Specifies the
interface containing endpoint information to use in creating a binding for the
protocol sequence specified in the Protseq argument.
SecurityDescriptor
Points to an
optional parameter provided for the Microsoft Windows NT security subsystem.
Policy
Points to the
RPC_POLICY
Remarks
The
parameters and effects of RpcServerUseProtseqsIfEx subsume those of RpcServerUseProtseqsIf.
The difference is the Policy field, which allows you to restrict port
allocation for dynamic ports and allows multi-homed machines to selectively
bind to network interface cards.
Setting the NICFlags
field of the RPC_POLICY structure to 0 makes this extended API functionally
equivalent to the original RpcServerUseProtseqIf, and the server will
bind to NICs based on the settings in the system registry. For information on
how the registry settings define the available Internet and intranet ports, see
Configuring the Windows NT Registry for Port Allocations and Selective
Binding
Note The flag
settings in the Policy field are effective only when the ncacn_ip_tcp
protocol sequence is in use; for all other protocol sequences, the RPC runtime
ignores these values.
A server
application calls the RpcServerUseProtseqIfEx routine to register one
protocol sequence with the RPC run-time library. With each protocol-sequence
registration, the routine includes the endpoint-address information provided in
the IDL file.
To receive
remote procedure call requests, a server must register at least one protocol
sequence with the RPC run-time library. A server application can call this
routine multiple times to register additional protocol sequences.
For each
protocol sequence registered by a server, the RPC run-time library creates one
or more binding handles through which the server receives remote procedure call
requests.
The MaxCalls
argument allows the server to specify the maximum number of concurrent remote
procedure call requests the server wants to handle.
To register
all protocol sequences from the IDL file, a server calls the RpcServerUseAllProtseqsIfEx
routine.
Return Values
Value |
Meaning |
RPC_S_OK |
Success |
RPC_S_PROTSEQ_NOT_FOUND |
The
endpoint for this protocol sequence is not specified in the IDL file |
RPC_S_PROTSEQ_NOT_SUPPORTED |
Protocol
sequence is not supported on this host |
RPC_S_INVALID_RPC_PROTSEQ |
Invalid
protocol sequence |
RPC_S_INVALID_ENDPOINT_FORMAT |
Invalid
endpoint format |
RPC_S_OUT_OF_MEMORY |
Out of
memory |
RPC_S_INVALID_SECURITY_DESC |
Security
descriptor is invalid |
See Server
Application RPC API Calls
See Also