Creates a connection structure with error callback, but does not establish a connection.
SMC_RETURN_CODE smc_connect_alloc (SMC_GEN_CALLBACK ErrCallback, SMC_CONNECT_IDP clientIdHandle)
Pointer to error callback function.
Pointer to a variable, which should be declared as type SMC_CONNECT_ID. If the call to smc_connect succeeds, this variable contains the ID for the Monitor connection.
| Return value | Indicates | 
|---|---|
| SMC_RET_SUCCESS | Function succeeded. | 
| SMC_RET_FAILURE | Function failed. | 
The following example assumes you have defined an error callback function, myErrorHandler.
SMC_CONNECT_ID  clientId;
 if (smc_connect_alloc(myErrorHandler,&clientId) 
 		!= SMC_RET_SUCCESS)
 {
 		printf("smc_connect_alloc failed\n");
 		exit(1);
 }
The error handler parameter cannot be null.
Use smc_connect_props to set properties on a connection.
Use smc_connect_ex to establish the connection identified by clientIdHandle.
Use smc_connect_drop to deallocate a connection structure created with smc_connect_alloc.
| Mode | Availability | 
|---|---|
| SMC_SERVER_M_LIVE | Yes | 
| SMC_SERVER_M_HISTORICAL | Yes | 
| Error | Indicates | 
|---|---|
| SMC_RET_INSUFFICIENT_MEMORY | Insufficient memory | 
| SMC_RET_INTERNAL_ERROR | Internal error | 
smc_connect_drop, smc_connect_ex, smc_connect_props
| Copyright © 2005. Sybase Inc. All rights reserved. |   | |