RpcServerUseProtseqEpEx

The RpcServerUseProtseqEpEx function tells the RPC run-time library to use the specified protocol sequence combined with the specified endpoint for receiving remote procedure calls. For a list of the protocol sequences supported by Microsoft RPC, see String Binding.

This function is supported only on Windows NT 4.0.

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

Parameters

Protseq
Pointer to a string identifier of the protocol sequence to register with the RPC run-time library.
MaxCalls
The maximum number of concurrent remote procedure call requests the server can 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.

Endpoint
Pointer to the endpoint-address information to use in creating a binding for the protocol sequence specified by Protseq.
SecurityDescriptor
Pointer to an optional parameter provided for the Microsoft Windows NT security subsystem.
Policy
Points to the RPC_POLICY structure, which contains flags that set transport-specific attributes. In the case of the ncadg_mq transport, these flags specify the properties of the server-process receive queue. In the case of the ncacn_ip_tcp or ncadg_ip_udp transports, these flags restrict port allocation for dynamic ports and allow multihomed machines to selectively bind to network interface cards. The flag settings in the Policy fieldare effective only when the ncacn_ip_tcp, ncadg_ip_udp, or ncadg_mq protocol sequences are in use. For all other protocol sequences, the RPC run time ignores these values.

Return Values

Value Meaning
RPC_S_OK Success.
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_DUPLICATE_ENDPOINT Endpoint is a duplicate.
RPC_S_INVALID_SECURITY_DESC Security descriptor is invalid.

Remarks

The parameters and effects of RpcServerUseProtseqEpEx subsume those of RpcServerUseProtseqEp. The difference is the Policy argument, which allows you to set specific policies at the endpoints. Setting the NICFlags field of the RPC_POLICY structure to zero makes this extended function equivalent to the original RpcServerUseProtseqEp when used with the ncacn_ip_tcp or ncadg_ip_udp transports.

A server application calls the RpcServerUseProtseqEpEx routine to register one protocol sequence with the RPC run-time library. With each protocol sequence registration, RpcServerUseProtseqEpEx includes the specified endpoint-address information.

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 many times to register additional protocol sequences and endpoints.

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 can handle.

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

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.

For information on using the message-queuing transport (ncadg_mq) see RPC Message Queuing and the MIDL reference pages message and ncadg_mq.

QuickInfo

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

See Also

RPC_POLICY, RpcServerUseAllProtseqsEx, RpcServerUseAllProtseqsIfEx, RpcServerUseProtseqEx, RpcServerUseProtseqIfEx