RpcServerUseAllProtseqsEx

The RpcServerUseAllProtseqsEx function tells the RPC run-time library to use all supported protocol sequences for receiving remote procedure calls. For a list of Microsoft RPC's supported protocol sequences, see the reference topic String Binding in RPC Data Types and Structures.

This function is supported only on Windows NT 4.0.

#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcServerUseAllProtseqsEx( 
  unsigned int  MaxCalls,   
  void *  SecurityDescriptor,  
  PRPC_POLICY Policy        
);
 

Parameters

MaxCalls
Specifies the maximum number of concurrent remote procedure call requests the server can accept.

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 and can vary for each protocol sequence. Use RPC_C_PROTSEQ_MAX_REQS_DEFAULT to specify the default value.

SecurityDescriptor
Points to an optional parameter provided for the Microsoft Windows NT security subsystem.
Policy
Points to the RPC_POLICY structure, which allows you to override the default policies for dynamic port allocation and binding to network interface cards (NICs) on multihomed machines.

Remarks

The parameters and effects of RpcServerUseAllProtseqsEx subsume those of RpcServerUseAllProtseqs. The difference is the Policy parameter, which allows you to restrict port allocation for dynamic ports and allows multihomed machines to selectively bind to specified NICs.

Setting the NICFlags field of the RPC_POLICY structure to zero makes this extended API functionally equivalent to the original RpcServerUseAllProtseqs, 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 or ncadg_ip_udp protocol sequence is in use. For all other protocol sequences, the RPC run time ignores these values.

A server application calls the RpcServerUseAllProtseqsEx routine to register all of the supported protocol sequences with the RPC run-time library. To receive remote procedure calls, a server must register at least one protocol sequence with the RPC run-time library.

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 RPC run-time library creates different binding handles for each protocol sequence. Each binding handle contains an endpoint dynamically generated by the RPC run-time library or the operating system.

The MaxCalls argument allows the server to specify the maximum number of concurrent remote procedure call requests the server wants to handle.

To selectively register protocol sequences, a server calls the RpcServerUseProtseqEx, RpcServerUseProtseqIfEx, or RpcServerUseProtseqEpEx routine.

Return Values

Value Meaning
RPC_S_OK Success
RPC_S_NO_PROTSEQS No supported protocol sequences
RPC_S_OUT_OF_MEMORY Insufficient memory available
RPC_S_INVALID_SECURITY_DESC Security descriptor is invalid

See Server Application RPC API Calls for a description of the routines that a server will typically call after registering protocol sequences.

QuickInfo

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

See Also

Configuring the Windows NT Registry for Port Allocations and Selective Binding, RpcServerUseAllProtseqsIfEx, RpcServerUseProtseqEx, RpcServerUseProtseqEpEx, RpcServerUseProtseqIfEx