RPC_POLICY structure (rpcdce.h)
The RPC_POLICY structure contains flags that determine binding on multihomed computers, and port allocations when using the ncacn_ip_tcp and ncadg_ip_udp protocols.
Syntax
typedef struct _RPC_POLICY {
unsigned int Length;
unsigned long EndpointFlags;
unsigned long NICFlags;
} RPC_POLICY, *PRPC_POLICY;
Members
Length
Size of the RPC_POLICY structure, in bytes. The Length member allows compatibility with future versions of this structure, which may contain additional fields. Always set the Length equal to sizeof(RPC_POLICY) when you initialize the RPC_POLICY structure in your code.
EndpointFlags
Set of flags that determine the attributes of the port or ports where the server receives remote procedure calls. You can specify more than one flag (by using the bitwise OR operator) from the set of values for a given protocol sequence. The following table lists the possible values for the EndpointFlags member.
Value | Meaning |
---|---|
|
Specifies the system default. |
|
Allocates the endpoint from one of the ports defined in the registry as "Internet Available." Valid only with ncacn_ip_tcp and ncadg_ip_udp protocol sequences. |
|
Allocates the endpoint from one of the ports defined in the registry as "Intranet Available." Valid only with ncacn_ip_tcp and ncadg_ip_udp protocol sequences. |
|
The server process–receive queue will be deleted automatically when the RPC server exits. Any outstanding calls still in the queue will be lost. This is the default. Valid only with the ncadg_mq protocol sequence. |
|
Specifies that the server process–receive queue persists after the server process exits. The default is that the queue is deleted when the server process terminates. Valid only with ncadg_mq protocol sequence. |
|
If the receive queue already exists because it was opened previously as a permanent queue, then clear any outstanding calls waiting in the queue. Valid only with the ncadg_mq protocol sequence only. |
|
If the receive queue already exists, then do not modify its existing settings for authentication or encryption. Valid only with the ncadg_mq protocol sequence. |
|
The server process–receive queue accepts only authenticated calls from clients. The default is that both authenticated and unauthenticated calls are accepted. Valid only with ncadg_mq protocol sequence. |
|
Calls to server are encrypted. The default is that both encrypted and unencrypted calls are accepted. Valid only with ncadg_mq protocol sequence. |
|
The server's receive queue accepts all calls from clients. This is the default authentication level. Valid only with the ncadg_mq protocol. |
|
Sets the server's receive queue to only accept client calls that have authentication level RPC_C_AUTHN_LEVEL_PKT_INTEGRITY or RPC_C_AUTHN_LEVEL_PKT_PRIVACY. Valid only with the ncadg_mq protocol sequence. |
|
Sets the server's receive queue to only accept client calls that have authentication level RPC_C_AUTHN_LEVEL_PKT_PRIVACY. Calls with a lower authentication level are ignored. Valid only with the ncadg_mq protocol sequence. |
NICFlags
Policy for binding to Network Interface Cards (NICs). The following table lists the possible values for the NICFlags member.
Value | Meaning |
---|---|
|
Binds to NICs on the basis of the registry settings. Always use this value when you are using the RPC_POLICY structure to define message-queue properties. |
|
Overrides the registry settings and binds to all NICs. If the Bind key is missing from the registry, then the NICFlags member will have no effect at run time. If the key contains an invalid value, then the entire configuration is marked as invalid and all calls to RpcServerUseProtseq* will fail. |
Remarks
You can use the RPC_Policy structure to set policies for remote procedure calls at run time. These policies include:
- Message queuing: Allows the server to specify message-queuing properties, such as security, quality of delivery, and the lifetime of the server-process queue. This policy is only effective for remote calls over the message-queuing transport (ncadg_mq).
- Port allocation for dynamic ports: Specifies whether the endpoint registered by this application should go to the Internet-available or intranet-available port set.
- Selective binding: Allows multihomed machines to bind selectively to NICs.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | rpcdce.h (include Rpc.h) |
See also
Configuring the Registry for Port Allocations and Selective Binding