cwbOBJ_SetConnectionsToKeep
Use the cwbOBJ_SetConnectionsToKeep API with this product.
Purpose
Set the number of connections that should be left active for a particular system. Normally, the cwbobj.dll will time out and drop connections after they have not been used for a while. With this API you can force it to leave open a certain number of connections for this system.
Syntax
unsigned int CWB_ENTRY cwbOBJ_SetConnectionsToKeep(
const char *systemName
unsigned int connections
cwbSV_ErrHandle errorHandle);
Parameters
- const char *systemName - input
- Pointer to the system name contained in ASCIIZ string.
- unsigned int connections - input
- The number to of connections to keep open.
- cwbSV_ErrHandle errorHandle - output
- Optional, may be 0. Any returned messages will be written to this object. It is created with the cwbSV_CreateErrHandle() API. The messages may be retrieved through the cwbSV_GetErrText() API. If the parameter is set to zero, no messages will be retrievable.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_INVALID_PARAMETER
- Invalid parameter specified.
Usage
The default number of connections left open per system is 0. The connections are made per process, so this API only affects connections under the process it is called under. Setting the number of connections to be left open does not open any new connections.