RpcMgmtSetServerStackSize  3N2K02O

The RpcMgmtSetServerStackSize function specifies the stack size for each server thread.

This function is supported by both 32-bit platforms   Windows NT and Windows 95.

#include <rpc.h>

RPC_STATUS RPC_ENTRY RpcMgmtSetServerStackSize(

    unsigned int  ThreadStackSize

 

   );

 

 

Parameters

ThreadStackSize

Specifies the stack size in bytes allocated for each thread created by RpcServerListen. This value is applied to all threads created for the server. Select this value based on the stack requirements of the remote procedures offered by the server.

 

Remarks

A server application calls the RpcMgmtSetServerStackSize routine to specify the thread stack size to use when the RPC run-time library creates call threads for executing remote procedure calls. The MaxCalls argument in the RpcServerListen routine specifies the number of call threads created.

Servers that know the stack requirements of all the manager routines in the interfaces it offers can call the RpcMgmtSetServerStackSize routine to ensure that each call thread has the necessary stack size.

Calling RpcMgmtSetServerStackSize is optional. However, when used, it must be called before the server calls RpcServerListen. If a server does not call RpcMgmtSetServerStackSize, the default per thread stack size from the underlying threads package is used.

Return Values

Value

Meaning

RPC_S_OK

Success

RPC_S_INVALID_ARG

Invalid argument

 

See Also

RpcServerListen