RpcWinSetYieldTimeout
The RpcWinSetYieldTimeout
function configures the amount of time an RPC call will wait for the server to
respond before invoking the application s RPC yielding mechanism. This function
is only available for Windows 3.x applications.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcWinSetYieldTimeout (
unsigned
int
Timeout |
|
); |
|
Parameters
Timeout
Specifies the
timeout value in milliseconds. If this function is not called, the default is
500 milliseconds.
Remarks
Depending on
the type of yielding specified in RpcWinSetYieldInfo
If the Timeout
value is small, the yielding mechanism can be invoked too often. This results
in loss of performance. Conversely, if the value specified for Timeout
is too large, the application and system will be frozen for the timeout period.
To avoid this, use timeouts in the range of 500 to 2000 milliseconds.
The RpcWinSetYieldTimeout
function can be called more than once by an application. Each call simply
replaces the information stored in the previous calls.
Return Values
Value |
Meaning |
RPC_S_OK |
Success |
RPC_S_CANNOT_SUPPORT |
RpcWinSetYieldInfo
must be called prior to RpcWinSetYieldTimeout. |
See Also